04.01.2014, 14:32
Код:
CMD:giveallweapon(playerid, params[]) { if(PlayerInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid)) for(new i = 0; i < MAX_PLAYERS; i++) { new weapon, ammo, string[128], name[128]; if(sscanf(params,"ii", weapon, ammo)) return SendClientMessage(playerid, grey,"Syntax: /giveallweapon [weaponid] [ammo]"); if(IsPlayerConnected(i)) { GivePlayerWeapon(i, weapon, ammo); } format(string,sizeof(string),"Administrator %s has given all players weapon: %d with %d ammo",name,weapon,ammo); SendClientMessageToAll(blue,string); CMDMessageToAdmins(playerid,"GIVEALLWEAPON"); } else SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command"); return 1; }