[SOLVED] Random Colour - 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)
+--- Thread: [SOLVED] Random Colour (
/showthread.php?tid=432505)
[SOLVED] Random Colour -
MP2 - 22.04.2013
How do you get a random colour with no alpha (FF)?
EDIT: RESOLVED..
pawn Код:
(random(cellmax) | 0x000000FF)
I knew it was something similar, but I kept trying '&'.
EDIT: Actually, that's only half of the colours..
pawn Код:
(random(-cellmax)+cellmax | 0x000000FF)
EDIT: Actually, I think it's this:
pawn Код:
(random(cellmax*2)-cellmax | 0x000000FF)
(Not tested)