Admin Duty
#1

Hello,
What I would like to know, which I figure this is very simple but I have no idea what the line would write out as.

I want to know how to change the color of an admins name when he/she goes onto admin duty.

EX: If I got on adminduty, I would like my name to show up as RED when I am on adminduty and the normal white when I am off, so that players know who is on admin duty.

Anyone care you help?

At the moment my aduty command looks like this:
Код:
command(aduty, playerid, params[])
{
#pragma unused params
    new string[128];
    if(Player[playerid][AdminLevel] >= 1) {
        if(Player[playerid][AdminDuty] == 0) {
            if(strlen(Player[playerid][AdminName]) >= 1 || strcmp(Player[playerid][AdminName], "Nothing", true) == 0) {
                SendClientMessage(playerid, WHITE, "You are now on admin duty.");
                Player[playerid][AdminDuty] = 1;

                if(Player[playerid][AdminLevel] >= 3) {
                    SetPlayerHealth(playerid, 500000);
                }

                SetPlayerSkin(playerid, Player[playerid][AdminSkin]);

                if(Player[playerid][HospitalTime] >= 1) {
                    Player[playerid][HospitalTime] = 0;
                    SetCameraBehindPlayer(playerid);
                    SetPlayerPos(playerid, SpawnX, SpawnY, SpawnZ);
                    SetPlayerDrunkLevel(playerid, 0);
                    SendClientMessage(playerid, WHITE, "You have been de-hospitalized.");
                }

                format(string, sizeof(string), "%s is now on Admin Duty.", Player[playerid][NormalName]);
                SendToAdmins(ADMINORANGE, string, 0);
            }
            else {
                SendClientMessage(playerid, WHITE, "You haven't set an administrators' name yet.");
            }
        }
        else {
            SendClientMessage(playerid, WHITE, "You're now off admin duty, though you will still see admin chat.");
            Player[playerid][AdminDuty] = 0;

            SetPlayerColor(playerid, WHITE);

            if(Player[playerid][AdminLevel] >= 3) {
                SetPlayerHealth(playerid, 100);
            }

            if(strlen(Player[playerid][NormalName]) > 1) {
                SetPlayerName(playerid, Player[playerid][NormalName]);
            }

            SetPlayerSkin(playerid, Player[playerid][LastSkin]);

            format(string, sizeof(string), "%s is now off Admin Duty.", GetName(playerid));
            SendToAdmins(ADMINORANGE, string, 0);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Admin Duty - by BrokinJesus - 15.10.2011, 06:39
Re: Admin Duty - by =WoR=Varth - 15.10.2011, 06:42
Re: Admin Duty - by BrokinJesus - 15.10.2011, 06:45
Re: Admin Duty - by GrimR - 15.10.2011, 06:49
Re: Admin Duty - by BrokinJesus - 15.10.2011, 06:54
Re: Admin Duty - by GrimR - 15.10.2011, 07:03

Forum Jump:


Users browsing this thread: 4 Guest(s)