0xFFFFFFAA to {FFFFFF}
#1

Hi,

I have a variable "Color" contains 0xFFFFFFAA. I want to transform contains to "{FFFFFF}". How ?

PHP код:
SendClientMessageEx(playerid, -1"{%06x}test"ClanInfoPlayerInfo[playerid][pClan] ][Couleur] >>> 8); 
This script don't work, why ?
Reply
#2

Fixed.

Maked a little function :

PHP код:
stock GetColor(string[])
{
    new
        
new_string[124],
        
new_string2[124];
        
    
strmid(new_stringstring28);
    
format(new_string2sizeof(new_string2), "{%s}"new_string);
    return 
new_string2;

----------------------------------------
PHP код:
GetColor(0x00767CFF); 
return
Код:
{00767C}
Reply
#3

Faster
PHP код:
stock GetColor(color){
    new 
string[10];
    
format(string,sizeof(string),"{%06x}",(color >>> 8));
    return 
string;

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)