25.06.2014, 14:57
I've been trying this
and on saving, I did:
But my colors are :
0xFFFF00AA
0xFF0000AA
pawn Код:
stock HexToInt(string[]) // By DracoBlue
{
if (string[0]==0) return 0;
new i;
new cur=1;
new res=0;
for (i=strlen(string);i>0;i--) {
if (string[i-1]<58) res=res+cur*(string[i-1]-48); else res=res+cur*(string[i-1]-65+10);
cur=cur*16;
}
return res;
}
pawn Код:
format(color, sizeof(color), "0x%sFF", mHolder);
SetPlayerColor(playerid, HexToInt(str));
0xFFFF00AA
0xFF0000AA