On spawn name can only be these colors? - 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: On spawn name can only be these colors? (
/showthread.php?tid=90767)
On spawn name can only be these colors? -
ThePS3Guy - 10.08.2009
When u spawn, ur name is a random color, how do I make it so that it can only be a color that I say it can? For example, if I want it to only be either red green or blue, how can I make it so that the name is not any other color?
Re: On spawn name can only be these colors? -
BioShock - 10.08.2009
on mine i have it as underplayerspawn
setplayercolor
it works for me, try it
Something like
SetPlayerColor(playerid, COLOR_RED);
EDIT - My bad, i missed the 'Random' Part XD
Re: On spawn name can only be these colors? -
Yuryfury - 10.08.2009
under OnPlayerSpawn
pawn Код:
new randomcolor = random(3)
switch(randomcolor)
{
case 0: SetPlayerColor(playerid,BLUE);
case 1: SetPlayerColor(playerid,GREEN);
case 2: SetPlayerColor(playerid,RED);
}
Re: On spawn name can only be these colors? -
ThePS3Guy - 10.08.2009
Thanks Yurifury and hitman that helped a lot