19.12.2017, 10:10
PHP код:
CMD:adminduty(playerid, params[])
{
if(!PlayerInfo[playerid][Level] && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOUR_BLUE, "You're not an admin!");
adminDuty[playerid] = !adminDuty[playerid];
SetPlayerHealth(playerid, adminDuty[playerid] ? 9999.0 : 100.0);
SendClientMessage(playerid,COLOUR_BLUE,adminDuty[playerid] ? ("You are now on duty!") : ("You are now off duty!"));
SetPlayerColor(playerid,adminDuty[playerid] ? COLOUR_BLUE : 0xFFFFFFFF);
SetPlayerSkin(playerid,adminDuty[playerid] ? 294 : 0); //if adminDuty[playerid] == 0 then skin=cj
new msg[42];
format(msg, sizeof(msg), adminDuty[playerid] ? ("%s is now on Duty!") : ("%s is now off Duty!"), GetPlayerNameEx(playerid));
SendClientMessageToAll(COLOUR_BLUE, msg);
return 1;
}