25.12.2012, 19:51
pawn Code:
//Top
new AdminDuty[MAX_PLAYERS_NAME];
new Text3D:label[MAX_PLAYERS];
CMD:aduty(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_ORANGE, "[*] You're not a level 1+ admin!");
if(AdminDuty[playerid] == 1)
{
AdminDuty[playerid] = 0;
SendClientMessage(playerid,COLOR_BLUE,"You are now off duty!");
SpawnPlayer(playerid);
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s[%d] is now off duty!", pName, playerid);
SendClientMessageToAll(COLOR_RED, string);
}
else
{
SendClientMessage(playerid,COLOR_ORANGE,"You are now a admin on duty !");
SendClientMessage(playerid,COLOR_ORANGE,"You have set a label to you, it means that you ARE a admin so now is your playercolor LIGHTBLUE !");
SendClientMessage(playerid,COLOR_ORANGE,"THIS MEANS TOO : YOU DON'T FIGHT AGAINST OTHER PLAYERS ! YOU'RE ON DUTY !!");
label[playerid] = Create3DTextLabel("Admin On Duty! Do not attack!",0x008080FF,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
SetPlayerColor(playerid, 0xFFC0CBAA);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,38,1000); GivePlayerWeapon(playerid,24,1000);
GivePlayerWeapon(playerid,9,1);
AdminDuty[playerid] = 1;
SetPlayerSkin(playerid, 219);
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s[%d] is now on admin duty!", pName, playerid);
SendClientMessageToAll(COLOR_RED, string);
}
return 1;
}