#define FILTERSCRIPT#define function%0(%1) forward%0(%1);public%0(%1)#include a_sampnew weapo[MAX_PLAYERS][12], ammo[MAX_PLAYERS][12];function SaveWeapons(playerid) {for(new i = 0; i < 12; i++) {GetPlayerWeaponData(playerid, i+1, weapo[playerid], ammo[playerid]);}}function LoadWeapons(playerid) { for(new i = 0; i < 12; i++) {GivePlayerWeapon(playerid, weapo[playerid], ammo[playerid]);}}//LoadWeapons(playerid);//SaveWeapons(playerid);
function SaveWeapons(playerid) { for(new i = 0; i < 12; i++) { GetPlayerWeaponData(playerid, i+1, weapo[playerid], ammo[playerid]); }}
warning 219: local variable \"ammo\" shadows a variable at a preceding level
CMD:mgm(playerid, params[]){new rand = random(sizeof(RandomMiniSpawn));SetPlayerPos(playerid, RandomMiniSpawn[rand][0], RandomMiniSpawn[rand][1],RandomMiniSpawn[rand][2]);SaveWeapons(playerid);ResetPlayerWeapons(playerid);GivePlayerWeapon(playerid,38,1000000);SetPlayerVirtualWorld(playerid,2);SetPlayerHealth(playerid,100);SetPlayerArmour(playerid,100);SendClientMessage(playerid,0xbc0000,\"Minigun Dm zónába léptél!\");dmzone[playerid] = true;return 1;}CMD:exitdm(playerid, params[]){ if(dmzone[playerid] == true) { dmzone[playerid] = false;SetPlayerVirtualWorld(playerid, 0);new rand = random(sizeof(RandomSpawn));SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);SendClientMessage(playerid,0xbc0000,\"Kiléptél a DM zónából!\");ResetPlayerWeapons(playerid);LoadWeapons(playerid);}else{SendClientMessage(playerid,COL_PIROS,\"ERROR: Nem vagy zónában\");}return 1;}
CMD:exitdm(playerid, params[]){ if(dmzone[playerid] == true) { dmzone[playerid] = false; SetPlayerVirtualWorld(playerid, 0); new rand = random(sizeof(RandomSpawn)); SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]); SendClientMessage(playerid,0xbc0000,\"Kiléptél a DM zónából!\"); ResetPlayerWeapons(playerid); LoadWeapons(playerid); } else { SendClientMessage(playerid,COL_PIROS,\"ERROR: Nem vagy zónában\"); } return 1;}
CMD:exitdm(playerid, params[]){ if(dmzone[playerid] == false) return SendClientMessage(playerid,COL_PIROS,\"ERROR: Nem vagy zónában\"); dmzone[playerid] = false; SetPlayerVirtualWorld(playerid, 0); new rand = random(sizeof(RandomSpawn)); SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]); SendClientMessage(playerid,0xbc0000,\"Kiléptél a DM zónából!\"); ResetPlayerWeapons(playerid); LoadWeapons(playerid); return 1;}