08.12.2011, 08:15
I Have Problem with this Command.
When I go "On Duty" I can't go to "off Duty"
When Im "On Duty" and I type that command Nothing Happens
When I go "On Duty" I can't go to "off Duty"
Код:
dcmd_AdminDuty(playerid, cmdtext[]){ #pragma unused cmdtext if(IsPlayerLAdmin(playerid)) { if(Admin[playerid] == 0) { Admin[playerid] = 1; new str[128], AdminName[28]; GetPlayerName(playerid, AdminName, sizeof(AdminName)); format(str, sizeof(str), "%s Is Now On Admin Duty!", AdminName); SendClientMessageToAll(COLOR_RED2, str); SetPlayerSkin(playerid,217); SetPlayerTeam(playerid, 6); SetPlayerColor(playerid, COLOR_PINK); SetPlayerHealth(playerid, 10000000); SetPlayerArmour(playerid, 10000000); GivePlayerWeapon(playerid, 9, 999999999); GivePlayerWeapon(playerid, 38,999999999); GivePlayerWeapon(playerid, 24,999999999); GivePlayerWeapon(playerid, 26,999999999); GivePlayerWeapon(playerid, 31,999999999); GivePlayerWeapon(playerid, 34,999999999); GivePlayerWeapon(playerid, 32,999999999); GivePlayerWeapon(playerid, 42,999999999); GivePlayerWeapon(playerid, 16,999999999); label2[playerid] = Create3DTextLabel("Admin On Duty Do Not Attack",COLOR_GREEN,40.0,60.0,80.0,60.0,0); Attach3DTextLabelToPlayer(label2[playerid], playerid, 0.0, 0.0, 0.7); } else if(Admin[playerid] == 1) { Admin[playerid] = 0; new str[128], AdminName[28]; GetPlayerName(playerid, AdminName, sizeof(AdminName)); format(str, sizeof(str), "%s Is Now Off Admin Duty!", AdminName); SendClientMessageToAll(COLOR_RED2, str); ForceClassSelection(playerid); SetPlayerHealth(playerid, 0); } Erorr1 }