23.02.2015, 05:14
Quote:
|
Код:
CMD:aduty(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "You are not authorized to use this command.");
if(PlayerInfo[playerid][pAdmin] <= 4)
{
if(PlayerInfo[playerid][pAdminDuty] == 0)
{
SendClientMessageEx(playerid, COLOR_WHITE, ""LGHT_BLUE"[HLRP]: {FFFFFF}You are now on admin-duty. Your duty is to help others not yourselves (admin abuse).");
PlayerInfo[playerid][pAdminDuty] = 1;
SetPlayerHealth(playerid, 1);
SetPlayerArmour(playerid, 100000);
PlayerInfo[playerid][pChar] = GetPlayerSkin(playerid);
}
else
{ SendClientMessageEx(playerid, COLOR_WHITE, ""LGHT_BLUE"[HLRP]: {FFFFFF}You are now off admin-duty. Resume roleplaying!");
new string[128];
SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
PlayerInfo[playerid][pAdminDuty] = 0;
}
return 1;
}
else return SendClientMessage(playerid-1," You need not be on duty");
}
|


