11.07.2009, 13:34
this is tricky for me, but i did run across "HexToInt", maybe this will get you started, you could read more about it to try and figure it out.
and an example was something like
good luck
edit: some threads
http://forum.sa-mp.com/index.php?topic=89879.0
http://forum.sa-mp.com/index.php?topic=54420.0
http://forum.sa-mp.com/index.php?top...2976#msg182976
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 Код:
new Color = GetPlayerColor(playerid);
PlayerInfo[i][Color] = HexToInt(Color);
edit: some threads
http://forum.sa-mp.com/index.php?topic=89879.0
http://forum.sa-mp.com/index.php?topic=54420.0
http://forum.sa-mp.com/index.php?top...2976#msg182976

