[HELP] Admin Duty Color in main chat.
#5

This command auto detects if the player is on/off admin duty and set their status based off that so no need to /aduty on/off now its just /aduty

post your define for COLOR_BAN

pawn Code:
CMD:aduty(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_WHITE,"You are not authorized to use that command.");
    else
    {
        if(PlayerInfo[playerid][pAdminDuty] == 0)
        {
            PlayerInfo[playerid][pAdminDuty] = 1;
            SetPlayerColor(playerid, COLOR_BAN);
            return SendClientMessage(playerid, COLOR_GREEN, "You are now administrator duty {29EB17} On.");
        }
        if(PlayerInfo[playerid][pAdminDuty] == 1)
        {
            PlayerInfo[playerid][pAdminDuty] = 0;
            SetPlayerColor(playerid, COLOR_WHITE);
            return SendClientMessage(playerid, COLOR_GREEN, "You are now administrator duty {EB4C17} Off");
        }
    }
    return 1;
}
Reply


Messages In This Thread
[HELP] Admin Duty Color in main chat. - by Arsham7 - 17.10.2011, 00:24
Re: [HELP] Admin Duty Color in main chat. - by Kingunit - 17.10.2011, 00:31
Re: [HELP] Admin Duty Color in main chat. - by Arsham7 - 17.10.2011, 00:39
Re: [HELP] Admin Duty Color in main chat. - by Arsham7 - 17.10.2011, 01:47
Re: [HELP] Admin Duty Color in main chat. - by Aldo. - 17.10.2011, 01:57
Re: [HELP] Admin Duty Color in main chat. - by Arsham7 - 17.10.2011, 02:05
Re: [HELP] Admin Duty Color in main chat. - by Aldo. - 17.10.2011, 02:17

Forum Jump:


Users browsing this thread: 1 Guest(s)