02.11.2013, 17:38
Just to let you know, you can also remove all these 15-20 lines which are annoying and replace them with:
I recommend you to re and re-read your grammar 
What I did is.
pawn Код:
CMD:aduty(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "** This is an admin only command!");
if(PlayerInfo[playerid][pAdminDuty] == 0)
{
SendClientMessageEx(playerid, COLOR_YELLOW, "{FFFFFF} ** You are now on administrative duty! Remember to check /reports!");
PlayerInfo[playerid][pAdminDuty] = 1;
SetPlayerHealth(playerid, 100000);
SetPlayerArmour(playerid, 100000);
PlayerInfo[playerid][pChar] = GetPlayerSkin(playerid);
SetPlayerSkin(playerid, 217);
PlayerInfo[playerid][pModel] = 217;
if (PlayerInfo[playerid][pAdmin] >= 1)
{
SetPlayerColor(playerid,COLOR_CYAN);
}
new string[256];
format(string, sizeof(string), ""OFICIAL_COLOR"*Voltage-Gaming-Roleplay* {FFFFFF}%s {32CD32}Is in admin service {00AFA8}to provide support. (/report for assistance)", GetPlayerNameEx(playerid));
SendClientMessageToAllEx(COLOR_RED, string);
}
else
{
new string[256];
format(string, sizeof(string), ""OFICIAL_COLOR"*Voltage-Gaming-Roleplay* {FFFFFF}%s {FF0000}Its no more in admin service {00AFA8}and now its in Role!", GetPlayerNameEx(playerid));
SendClientMessageToAllEx(COLOR_RED, string);
SetPlayerColor(playerid, TEAM_HIT_COLOR);
SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
PlayerInfo[playerid][pAdminDuty] = 0;
}
return 1;
}

What I did is.
Код:
if (PlayerInfo[playerid][pAdmin] >= 1) { SetPlayerColor(playerid,COLOR_CYAN); } Instead of if(Playerinfo[playerid][pAdmin] == 1) { SetPlayerColor(playerid,COLOR_CYAN); } ETC.............................................