11.01.2012, 08:06
Like This?
Код:
CMD:aduty(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 1) { foreach(Player, i) { new Float:health, Float:armour; new string[128]; if(GetPVarInt(playerid, "AdminDuty") == 0) { format( string, sizeof( string ), "{AA3333}[Notice]{FFFF00}: %s (ID: %d) is now on Admin duty.", GetPlayerNameEx(i), i); BroadCast( COLOR_YELLOW, string); GetPlayerHealth(playerid, health); GetPlayerArmour(playerid, armour); SetPlayerHealth(playerid, health + 100000); SetPlayerArmour(playerid, armour + 100000); SetPVarInt(playerid, "AdminDuty", 1); Admins += 1; } else { format( string, sizeof( string ), "{AA3333}{Notice]{FFFF00}: %s (ID: %d) is now off Admin duty.", GetPlayerNameEx(i), i); BroadCast( COLOR_YELLOW, string); SetPlayerHealth(playerid, health); SetPlayerArmour(playerid, armour); DeletePVar(playerid, "AdminDuty"); Admins -= 1; } } } else { SendClientMessageEx(playerid, COLOR_GRAD1, " You are not an Administrator."); } return 1; }