SA-MP Forums Archive
Player colours - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Player colours (/showthread.php?tid=275737)



Player colours - Rabbayazza - 10.08.2011

How do I make for example, a LSPD member have a blue name colour, and a Ballas Gangmember have purple.
The tutorials I've followed don't work.
I'm really new to scripting. Help.


Re: Player colours - =WoR=Varth - 10.08.2011

https://sampwiki.blast.hk/wiki/Function:SetPlayerColor


Re: Player colours - Rabbayazza - 10.08.2011

That doesn't help me. How do I make it so that for example, when someone spawns as skin 105, they get player colour green?


Re: Player colours - linuxthefish - 10.08.2011

Use GetPlayerSkin, and control statements in the OnPlayerSpawn callback.

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(GetPlayerSkin(playerid) == 105) SetPlayerColor(playerid, 0x7FFF00);
    return 1;
}



Re: Player colours - Unknown_Killer - 10.08.2011

hello

do @player spawn

if player join ballas then
SetPlayerColor(playerid,0x80008096);

like this example
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(gTeam[playerid] == Ballas)
    {
    SetPlayerColor(playerid,0x80008096);
    }
    return 1;
}