[MySQL]Setcolor
#3

I've been trying this
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;
}
and on saving, I did:

pawn Код:
format(color, sizeof(color), "0x%sFF", mHolder);
        SetPlayerColor(playerid, HexToInt(str));
But my colors are :
0xFFFF00AA
0xFF0000AA
Reply


Messages In This Thread
[MySQL]Setcolor - by Affan - 25.06.2014, 08:18
Re: [MySQL]Setcolor - by Konstantinos - 25.06.2014, 08:28
Re: [MySQL]Setcolor - by Affan - 25.06.2014, 14:57

Forum Jump:


Users browsing this thread: 1 Guest(s)