22.10.2010, 12:57
Put this function in your script
then use
pawn Код:
stock HexToInt(string[])
{
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 Код:
SetPlayerColor(playerid, HexToInt(dini_Get(org2,"Color")));