04.04.2012, 20:46
pawn Код:
CMD:aduty(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 0) return SendClientMessage(playerid, -1, "This is an admin only command!");
if(PlayerInfo[playerid][pAdminDuty] == 0)
{
SendClientMessageEx(playerid, COLOR_YELLOW, "You are now on administrative duty! Remember to check /reports!");
//SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
PlayerInfo[playerid][pAdminDuty] = 1;
SetPlayerHealth(playerid, 100000);
SetPlayerArmour(playerid, 100000);
SetPlayerColor(playerid, 0xFF550000);
new string[128];
PlayerInfo[playerid][pTogReports] = 0;
format(string, sizeof(string), "Administrator %s is now on Admin Duty! (Is Now OOC)",
GetPlayerNameEx(playerid));
ABroadCast(COLOR_LIGHTRED, string, 1);
if PlayerInfo[playerid][pAdminDuty] == 1*then
SetPlayerColor(playerid,0xFF66FF00),
format(string, sizeof(string),"[ADMIN]: %s is now on Admin Duty", GetPlayerNameEx(playerid)),
ABroadCast(COLOR_LIGHTRED, string, 1),
new Text3D:DutyLabel = Create3DTextLabel("Admin On Duty \n Do NOT Attack",0xFF000099,0,0,0,50,-1,1);
Attach3DTextLabelToPlayer(DutyLabel, playerid, 0,0,0);
}
else
{
SendClientMessageEx(playerid, COLOR_RED, "You are now off admin duty!");
new string[128];
format(string, sizeof(string), "Administrator %s is now off Admin Duty!", GetPlayerNameEx(playerid));
ABroadCast(COLOR_LIGHTRED, string, 1);
PlayerInfo[playerid][pTogReports] = 1;
//SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
PlayerInfo[playerid][pAdminDuty] = 0;
}
return 1;
}

