[Ajuda] Possivel?
#6

PHP код:
stock IntToHex(number// Dutils.inc
{
    new 
m=1;
    new 
depth=0;
    while (
number>=m) {
        
m*16;
        
depth++;
    }
    
depth--;
    new 
str[255];
    for (new 
depth>= 0i--)
    {
        
str[i] = ( number 0x0F) + 0x30;
        
str[i] += (str[i] > '9') ? 0x07 0x00;
        
number >>= 4;
    }
    
str[8] = '\0';
    return 
str;
}
public 
OnPlayerConnect(playerid)
{
    new 
string[100];
    
format(string,sizeof(string),"%x%x%x"random(255), random(255), random(255));
    
SetPlayerColor(playerid,IntToHex(strval(string)));
    return 
true;

Reply


Messages In This Thread
[Ajuda] Possivel? - by Dr_Pawno - 21.06.2011, 22:50
Re: [Ajuda] Possivel? - by Falcon. - 21.06.2011, 23:09
Re: [Ajuda] Possivel? - by TheGarfield - 21.06.2011, 23:34
Re: [Ajuda] Possivel? - by Dr_Pawno - 21.06.2011, 23:42
Re: [Ajuda] Possivel? - by [BGL]jonas_OwNer - 22.06.2011, 00:28
Re: [Ajuda] Possivel? - by RockFire - 22.06.2011, 00:38
Re: [Ajuda] Possivel? - by Dr_Pawno - 22.06.2011, 00:55
Re: [Ajuda] Possivel? - by steki. - 22.06.2011, 16:20
Re: [Ajuda] Possivel? - by Dr_Pawno - 22.06.2011, 16:29
Re: [Ajuda] Possivel? - by steki. - 22.06.2011, 17:09

Forum Jump:


Users browsing this thread: 2 Guest(s)