[SOLVED] Random Colour
#1

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)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)