Previous colour? - help!
#1

Hey. So when an admin goes on duty his nametag turns to orange. Now, I'm going to have different colours players nametags on my server so I need this command to work.

Whenever they get back from adminduty their colour turns to whatever colour they had before going on adminduty. Please help!

My code sofar:

pawn Код:
CMD:adminduty(playerid,params[])
{
    new string[128];
    if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid,COLOR_GREY,"[Error]: You're not authorized to use this command.");

    if(aDuty[playerid] == 0)
    {
        aDuty[playerid] = 1;
        format(string, sizeof(string), "AmdCmd: %s has went on adminduty.", GetName(playerid));
        ABroadCast(COLOR_LIGHTRED,string,1);
        SetPlayerColor(playerid, COLOR_ADMIN);
    }
    else if(aDuty[playerid] == 1)
    {
        aDuty[playerid] = 0;
        format(string, sizeof(string), "AmdCmd: %s has went on adminduty.", GetName(playerid));
        ABroadCast(COLOR_LIGHTRED,string,1);
        SetPlayerColor(playerid, PREVIOUS_COLOR?);
    }
    return 1;
}
Reply


Messages In This Thread
Previous colour? - help! - by Chrillzen - 17.10.2013, 12:13
Re: Previous colour? - help! - by venomlivno8 - 17.10.2013, 12:16
Re: Previous colour? - help! - by Konstantinos - 17.10.2013, 12:17
Re: Previous colour? - help! - by tyler12 - 17.10.2013, 12:17
Re: Previous colour? - help! - by Chrillzen - 17.10.2013, 12:22

Forum Jump:


Users browsing this thread: 1 Guest(s)