Change player color
#1

Hi

How to change player color ?

And change the color only admins ...



This screenshot is made with paint
Reply
#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
#3

Would be cool if someone makes a FS, that you can choose a player and let him get flashing names with different colors
Reply
#4

Nameless303

not working
I login and I give color LIGHTBLUE is not changed
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)