18.04.2014, 01:09
(
Last edited by SoNikMells; 12/05/2014 at 07:10 PM.
)
Рандомное значение HEX
Пример использования
Автор: SoNik))
PHP Code:
stock RandHex()
{
new r = random(239)+16;
new g = random(239)+16;
new b = random(239)+16;
return (r*16777216)+(g*65536)+(b*256)+0xFF;
}
// или можно в define
#define RandHex() ((random(239)+16)*16777216)+((random(239)+16)*65536)+((random(239)+16)*256)+0xFF
PHP Code:
SendClientMessage(playerid, RandHex(),"Text Color");
SetPlayerColor(playerid, RandHex());