17.08.2012, 14:32
Quote:
if i do this its just moves the bit why i need to do this
its dont do random with all colors i dont understand can you explane me agin? |
That means if the number is greater than ((2 ^ 31) - 1) [constant cellmax / in hex: 0x7FFFFFFF] it goes negative
Also the random function can only take positive values
Than to your problem, you want a random color, the format in pawn is RGBA (Red - Green - Blue - Alpha)
Means that only the first three RGB tell what color comes out, the Alpha only tells how good you can see it
Since there is no transparency in SendClientMessage you can always use 0xFF as alpha
pawn Код:
new color = random(0xFFFFFF) << 8 | 0xFF;