hi all - 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: hi all (
/showthread.php?tid=84413)
hi all -
Serediucr - 30.06.2009
i have new new colors[400]={ 400 colors}
how i can onplayerconnect set his color random one of my list?
Re: hi all -
yezizhu - 30.06.2009
pawn Код:
public OnPlayerConnect(playerid){
SetPlayerColor(playerid,random(sizeof(colors)));
return true;
}
Re: hi all -
Serediucr - 30.06.2009
Quote:
Originally Posted by yezizhu
pawn Код:
public OnPlayerConnect(playerid){ SetPlayerColor(playerid,random(sizeof(colors))); return true; }
|
i replaced colors with ColorsAlpha
and i get
Код:
C:\Documents and Settings\^^\My Documents\NikeRaptor\gamemodes\raz.pwn(2345) : warning 203: symbol is never used: "ColorsAlpha"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Re: hi all -
Serediucr - 30.06.2009
i renamed the colors alpha but same effect help?
Re: hi all -
Lenny_Carlson - 30.06.2009
It's just a warning that "ColorsAlpha" isn't used. If you want to use "ColorsAlpha" instead of "colors", change
Код:
SetPlayerColor(playerid,random(sizeof(colors)));
to:
Код:
SetPlayerColor(playerid,random(sizeof(ColorsAlpha)));
Re: hi all -
Serediucr - 30.06.2009
but that i made but i get same warning
Re: hi all -
refshal - 30.06.2009
EDIT: Add
pawn Код:
#pragma unused ColorsAlpha
under the
Typo.
Re: hi all -
mamorunl - 30.06.2009
Yea, and then the code will not work! woo-ee that is what we've been aiming for..
pawn Код:
SetPlayerColor(playerid, colors[random(sizeof(colors))]);
You can replace the colors with colorsalpha if that is the name of your
Re: hi all -
Serediucr - 30.06.2009
nvm , solved by myself!