SA-MP Forums Archive
SetPlayerColor for skin - 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: SetPlayerColor for skin (/showthread.php?tid=164739)



SetPlayerColor for skin - Henrix - 01.08.2010

Ok so, I made this script for FBI skins. So everyone with a FBI skin gets a blue name. But, weird is, the players still get the random spawning colors. How can I fix this?

Код:
public OnPlayerSpawn(playerid)
{
new pskin = GetPlayerSkin(playerid);
if(pskin == 166 || pskin == 165 || pskin == 285 || pskin == 286 || pskin == 163 || pskin == 164)
{
SetPlayerColor(playerid, COLOR_BLUE);
return 1;
}



Re: SetPlayerColor for skin - Jefff - 01.08.2010

This is FS? if yes put timer
pawn Код:
public OnPlayerSpawn(playerid)
{
    new pskin = GetPlayerSkin(playerid);
    SetTimerEx("FBI_Color",2000,false,"dd",playerid,pskin);
    return 1;
}

forward FBI_Color(p,s);
public FBI_Color(p,s)
{
    switch(s) {case 163..166,285,286: SetPlayerColor(p, COLOR_BLUE);}
    return 1;
}