Problem with HexToInt
#1

Hello guys, I'm using the function HexToInt, but I have a problem.
When I try to set the player's color to red it sets it as blue.
Here is my code:
PHP код:
format(TheColorsizeof(TheColor), "0xFF0000FF");
SetPlayerColor(playeridHexToInt(TheColor)); 
And here is my HexToInt function:
PHP код:
stock HexToIntstring[ ] )
{
    if( 
string] == ) return ( );
    new 
i;
    new 
cur 1;
    new 
res 0;
    for( 
strlen( string ); 0-- )
    {
        if( 
string] < 58 )
        {
            
res res cur * ( string] - 48 );
        }
        else
        {
            
res res cur * ( string] - 65 10 );
            
cur cur 16;
        }
    }
    return ( 
res );

Reply


Messages In This Thread
Problem with HexToInt - by Kraeror - 02.12.2018, 13:12
Re: Problem with HexToInt - by ItsRobinson - 02.12.2018, 13:27
Re: Problem with HexToInt - by Kraeror - 02.12.2018, 13:29
Re: Problem with HexToInt - by Kraeror - 02.12.2018, 13:35
Re: Problem with HexToInt - by ItsRobinson - 02.12.2018, 13:36
Re: Problem with HexToInt - by Dayrion - 02.12.2018, 14:02

Forum Jump:


Users browsing this thread: 1 Guest(s)