// This is a comment// uncomment the line below if you want to write a filterscript//#define FILTERSCRIPT#include <a_samp>#include <dini>new file[MAX_PLAYERS][128], name[24], szint[MAX_PLAYERS];#define zombie 10#define human 11#define humanskin 107#define zombieskin 60new getplayer, zmstart, zombieteamcounter, humanteamcounter, ammopack[MAX_PLAYERS];forward update(playerid);forward infect(playerid);new Float:damage[MAX_PLAYERS]; main(){print(\"\\n----------------------------------\");print(\" Zombie Mod with EXP\");print(\"----------------------------------\\n\");} public OnGameModeInit(){SetGameModeText(\"Blank Script\");SetTimer(\"update\", 2000, 1); //update timerAddPlayerClass(0,1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1);return 1;}public OnGameModeExit(){return 1;}public OnPlayerRequestClass(playerid, classid){SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);return 1;}public OnPlayerConnect(playerid){getplayer++;SetPlayerTeam(playerid, human);humanteamcounter++;ammopack[playerid] = 0;GetPlayerName(playerid,name,24); format(file[playerid],128,\"zmstats/%s.ini\",name); if(!dini_Exists(file[playerid])) return dini_Create(file[playerid]); szint[playerid] = dini_Int(file[playerid],\"Szint\");ammopack[playerid] = dini_Int(file[playerid],\"AmmoPack\");return 1;}public OnPlayerDisconnect(playerid, reason){ GetPlayerName(playerid,name,24); //lekérdezzük, majd elmentjük egy változóban a játékos nevét format(file[playerid],128,\"zmstats/%s.ini\",name); //megformázzuk a fájlnak a nevét dini_IntSet(file[playerid],\"Szint\",szint[playerid]); //átállítjuk a fájlban a szint értékét a játékos jelenlegi szintjére, majd késöbb ezt olvastatjuk be. dini_IntSet(file[playerid],\"AmmoPack\",ammopack[playerid]);getplayer--;if(GetPlayerTeam(playerid) == zombie) {zombieteamcounter--;} else if(GetPlayerTeam(playerid) == human) {humanteamcounter--;}return 1;}public OnPlayerSpawn(playerid){if(GetPlayerTeam(playerid) == zombie) {zombieteamcounter--;} else if(GetPlayerTeam(playerid) == human) {humanteamcounter--;}return 1;}public OnPlayerDeath(playerid, killerid, reason){ammopack[killerid]++;TogglePlayerSpectating(playerid, 1); PlayerSpectatePlayer(playerid, killerid); if(GetPlayerTeam(playerid) == zombie) {zombieteamcounter--;} else if(GetPlayerTeam(playerid) == human) {humanteamcounter--;}return 1;} public OnPlayerCommandText(playerid, cmdtext[]){if (strcmp(\"/givemelevel\", cmdtext, true, 10) == 0)// ez scak egy teszt hogy kiprobaljam mukodik e a mentes{szint[playerid]++;szint[playerid]++;return 1;}return 0;} public OnPlayerEnterCheckpoint(playerid){return 1;}public OnPlayerLeaveCheckpoint(playerid){return 1;} public OnPlayerRequestSpawn(playerid){return 1;}public OnObjectMoved(objectid){return 1;}public OnPlayerObjectMoved(playerid, objectid){return 1;}public OnPlayerPickUpPickup(playerid, pickupid){return 1;} public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid){return 1;}public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){return 1;} public OnPlayerUpdate(playerid){return 1;} public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){return 1;}public OnPlayerClickPlayer(playerid, clickedplayerid, source){return 1;}public update(playerid){ if(getplayer > 0) { zmstart = 1; } else if(getplayer == 0) { zmstart = 0; return 1; } if(zmstart == 1) { SetTimer(\"infect\", 8000, 0); return 1; } if(GetPlayerTeam(playerid) == zombie) { ResetPlayerWeapons(playerid); } SetPlayerScore(playerid, ammopack[playerid]); if(humanteamcounter == 0) { zmstart = 0; } else if(zombieteamcounter == 0) { zmstart = 0; } if(zmstart == 0) { SpawnPlayer(playerid); } if(GetPlayerTeam(playerid) == human) { SetPlayerSkin(playerid, humanskin); } else if(GetPlayerTeam(playerid) == zombie) { SetPlayerSkin(playerid, zombieskin); } return 1;} public infect(){ new rand = -1; while(!IsPlayerConnected(rand)) rand = random(MAX_PLAYERS); SetPlayerTeam(rand, zombie);}public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid){if(GetPlayerTeam(issuerid) == human) { damage[issuerid] += amount; if(damage[issuerid] >= 300) {ammopack[issuerid]++; damage[issuerid] = 0;//lenullázzuk,hogy újra el tudja érni,persze,csak ha kell } return 1; } if(GetPlayerTeam(issuerid) == zombie) { humanteamcounter--; zombieteamcounter++; SetPlayerTeam(playerid, zombie); ammopack[issuerid]++; if(GetPlayerWeapon(issuerid) != 0) { SetPlayerHealth(issuerid, 0); } } return 1;}
public OnFilterScriptInit()
public OnFilterScriptExit()
#include <a_samp>#include <dini>#define zombie 10#define human 11#define humanskin 107#define zombieskin 60#undef MAX_PLAYERS#define MAX_PLAYERS 20 // ezt majd állítsd át annyira, ahány slotos a szervered.new getplayer, zmstart, zombieteamcounter, humanteamcounter, ammopack[MAX_PLAYERS];new file[128], name[24], szint[MAX_PLAYERS];new Float:damage[MAX_PLAYERS];forward update(playerid);forward infect(playerid);main(){print(\"\\n----------------------------------\");print(\" Zombie Mod with EXP\");print(\"----------------------------------\\n\");}public OnGameModeInit(){SetGameModeText(\"Blank Script\");SetTimer(\"update\", 2000, 1);AddPlayerClass(0,1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1);return 1;}public OnGameModeExit(){return 1;}public OnPlayerRequestClass(playerid, classid){SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);return 1;}public OnPlayerConnect(playerid){getplayer++;SetPlayerTeam(playerid, human);humanteamcounter++;ammopack[playerid] = 0;GetPlayerName(playerid, name, MAX_PLAYER_NAME); format(file, 128, \"zmstats/%s.ini\",name); if(!dini_Exists(file)) {dini_Create(file);dini_IntSet(file, \"Szint\", 0);dini_IntSet(file, \"AmmoPack\", 0);} else if(dini_Exists(file)) { szint[playerid] = dini_Int(file, \"Szint\");ammopack[playerid] = dini_Int(file, \"AmmoPack\");}return 1;}public OnPlayerDisconnect(playerid, reason){ GetPlayerName(playerid, name, MAX_PLAYER_NAME); //lekérdezzük, majd elmentjük egy változóban a játékos nevét format(file, 128, \"zmstats/%s.ini\", name); //megformázzuk a fájlnak a nevét dini_IntSet(file, \"Szint\", szint[playerid]); //átállítjuk a fájlban a szint értékét a játékos jelenlegi szintjére, majd késöbb ezt olvastatjuk be. dini_IntSet(file, \"AmmoPack\", ammopack[playerid]);getplayer--;if(GetPlayerTeam(playerid) == zombie) zombieteamcounter--;else if(GetPlayerTeam(playerid) == human) humanteamcounter--;return 1;}public OnPlayerSpawn(playerid){if(GetPlayerTeam(playerid) == zombie) zombieteamcounter--;else if(GetPlayerTeam(playerid) == human) humanteamcounter--;return 1;}public OnPlayerDeath(playerid, killerid, reason){ammopack[killerid]++;TogglePlayerSpectating(playerid, 1); PlayerSpectatePlayer(playerid, killerid); if(GetPlayerTeam(playerid) == zombie) zombieteamcounter--;else if(GetPlayerTeam(playerid) == human) humanteamcounter--;return 1;}public OnPlayerCommandText(playerid, cmdtext[]){if (strcmp(\"/givemelevel\", cmdtext, true, 10) == 0){szint[playerid] += 2;return 1;}return 0;}public OnPlayerEnterCheckpoint(playerid){return 1;}public OnPlayerLeaveCheckpoint(playerid){return 1;}public OnPlayerRequestSpawn(playerid){return 1;}public OnObjectMoved(objectid){return 1;}public OnPlayerObjectMoved(playerid, objectid){return 1;}public OnPlayerPickUpPickup(playerid, pickupid){return 1;}public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid){return 1;}public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){return 1;}public OnPlayerUpdate(playerid){return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){return 1;}public OnPlayerClickPlayer(playerid, clickedplayerid, source){return 1;}public update(){if(getplayer > 0) zmstart = 1;else if(getplayer == 0) zmstart = 0;if(humanteamcounter == 0) zmstart = 0;else if(zombieteamcounter == 0) zmstart = 0;if(zmstart == 1) SetTimer(\"infect\", 8000, 0);for(new playerid = 0; playerid < MAX_PLAYERS; playerid++) {if(GetPlayerTeam(playerid) == zombie) ResetPlayerWeapons(playerid);SetPlayerScore(playerid, ammopack[playerid]);if(zmstart == 0) SpawnPlayer(playerid);if(GetPlayerTeam(playerid) == human && GetPlayerSkin(playerid) != humanskin) SetPlayerSkin(playerid, humanskin);else if(GetPlayerTeam(playerid) == zombie && GetPlayerSkin(playerid) != zombieskin) SetPlayerSkin(playerid, zombieskin);}return 1;}public infect(){ new rand = random(MAX_PLAYERS); if(!IsPlayerConnected(rand)) return infect(); SetPlayerTeam(rand, zombie); return 1;}public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid){if(GetPlayerTeam(issuerid) == human) { damage[issuerid] += amount; if(damage[issuerid] >= 300) { ammopack[issuerid]++; damage[issuerid] = 0; } } if(GetPlayerTeam(issuerid) == zombie) { humanteamcounter--; zombieteamcounter++; SetPlayerTeam(playerid, zombie); ammopack[issuerid]++; if(GetPlayerWeapon(issuerid) != 0) { SetPlayerHealth(issuerid, 0); } } return 1;}
D:\\sampserver\\gamemodes\\SkillZZMXPv2.pwn(168) : warning 202: number of arguments does not match definitionPawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 1 Warning.