19.12.2015, 14:04
i have this command but icant see admin on duty! and given me 1 warning.
Код:
CMD:aduty(playerid) { if(PlayerInfo[playerid][pAdmin] >=2 || IsPlayerAdmin(playerid)) { if (aDuty[playerid] == 0) { oldcolor[ playerid ] = GetPlayerColor( playerid ); oldskin[ playerid ] = GetPlayerSkin( playerid ); label = Create3DTextLabel("Admin on duty!", COLOR_PINK, 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7); SetPlayerHealth(playerid,9999999); ResetPlayerWeapons(playerid); SetPlayerColor(playerid,COLOR_PINK); SetPlayerSkin(playerid,217); GivePlayerWeapon(playerid, 38, 9999999); SendClientMessage(playerid,COLOR_PINK,"You are now on duty!"); aDuty[playerid] = 1; asay[playerid] = 1; } else if (aDuty[playerid] == 1) { DeletePlayer3DTextLabel(playerid, label); ResetPlayerWeapons(playerid); SetPlayerHealth(playerid,100); SpawnPlayer(playerid); SendClientMessage(playerid, COLOR_PINK,"You are now off duty!"); SetPlayerSkin(playerid,oldskin[playerid]); SetPlayerColor(playerid,oldcolor[playerid]); aDuty[playerid] = 0; asay[playerid] = 0; } } else SendClientMessage(playerid,COLOR_RED,"You do not have permission to use this command!"); return 1; }