15.10.2013, 19:45
try this
Код:
CMD:aduty(playerid,params[]) { if(PlayerInfo[playerid][Level] >= 1) { if(PlayerInfo[playerid][OnDuty] == 0) { PlayerInfo[playerid][OnDuty] = 1; new str[128], AdminName[28]; GetPlayerName(playerid, AdminName, sizeof(AdminName)); format(str, sizeof(str), "%s is now on Admin duty!", AdminName); SendClientMessageToAll(red, str); SetPlayerSkin(playerid,217); SetPlayerTeam(playerid, 6); SetPlayerColor(playerid, 0xF600F6FF); SetPlayerHealth(playerid, 100000000000); SetPlayerArmour(playerid, 100000000000); ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 38,999999999); Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " "); gTeam[playerid] = TEAM_NONE; } else if(PlayerInfo[playerid][OnDuty] == 1) { PlayerInfo[playerid][OnDuty] = 0; new str[128], AdminName[28]; GetPlayerName(playerid, AdminName, sizeof(AdminName)); format(str, sizeof(str), "%s is now off Admin duty", AdminName); SendClientMessageToAll(red, str); SetPlayerHealth(playerid, 0); ForceClassSelection(playerid); SetPlayerHealth(playerid, 0); SetPlayerArmour(playerid, 0); new rand = random(sizeof(PlayerColors)); SetPlayerColor(playerid, PlayerColors[rand]); FirstSpawn[playerid] = 1; } } else return 0; return 1; }