Change player color
#2

When the player connects;
Код:
public OnPlayerConnect(playerid)
{
	SetPlayerColor(playerid, YOUR COLOR HERE);
}
And for admin;
Код:
new IsPlayerRconAdmin[MAX_PLAYERS];

public OnGameModeInit()
{
    SetTimer("CheckForNewAdmins", 5000, 1);
    return 1;
}

public OnPlayerConnect(playerid)
{
    IsPlayerRconAdmin[playerid] = 0;
    return 1;
}

forward CheckForNewAdmins();
public CheckForNewAdmins()
{
    for(new i; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerAdmin(i) && IsPlayerRconAdmin[i] == 0)
            {
                IsPlayerRconAdmin[i] = 1;
                SetPlayerColor(playerid, YOUR ADMIN COLOR HERE);
            }
        }
    }
}
Have fun with it (:
Reply


Messages In This Thread
Change player color - by DokerJr - 03.11.2009, 10:24
Re: Change player color - by Nameless303 - 03.11.2009, 10:30
Re: Change player color - by David1338 - 03.11.2009, 10:36
Re: Change player color - by DokerJr - 03.11.2009, 11:00

Forum Jump:


Users browsing this thread: 2 Guest(s)