Samp color codes to int.
#3

Maybe this little function will help you:
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 );
}
Reply


Messages In This Thread
Samp color codes to int. - by budelis - 12.09.2012, 05:55
Re: Samp color codes to int. - by [HiC]TheKiller - 12.09.2012, 07:25
Re: Samp color codes to int. - by Roach_ - 12.09.2012, 07:25
Re: Samp color codes to int. - by budelis - 12.09.2012, 07:42
Re: Samp color codes to int. - by Roach_ - 12.09.2012, 07:47
Re: Samp color codes to int. - by [MM]RoXoR[FS] - 12.09.2012, 08:25
Re: Samp color codes to int. - by Audiophr3ak - 12.09.2012, 08:31

Forum Jump:


Users browsing this thread: 1 Guest(s)