[ajuda] Velocimetro
#1

PHP код:
public OnPlayerUpdate(playerid)
{
        new 
CarroFloat:CarXFloat:CarYFloat:CarZFloat:VelocidadefinalVelocidadeFinalInt;
        
Carro GetPlayerVehicleID(playerid);
        new 
Velostring[256];
        if(
Carro !=0)
        {
        
GetVehicleVelocity(Carro,CarX,CarY,CarZ);
        
Velocidadefinal floatsqroot((CarX*CarX))+((CarY*CarY))+((CarZ*CarZ))*176.666667;
        
VelocidadeFinalInt floatround(Velocidadefinal,floatround_round);
        
format(Velostring,256,"%i KM/h",VelocidadeFinalInt);
        
TextDrawSetString(Velocimetro[playerid], Velostring);
    }
    else
    {
        
TextDrawSetString(Velocimetro[playerid], " ");
    }
    return 
1;

No carro quando estб devagar fica 0 e quando eu acelero bastante muda para 1 onde esta o erro nesse code ??
Reply


Messages In This Thread
[ajuda] Velocimetro - by JOKERBOY - 24.04.2011, 05:30
Re: [ajuda] Velocimetro - by pGibson - 24.04.2011, 10:25
Re: [ajuda] Velocimetro - by JOKERBOY - 24.04.2011, 14:32
Re: [ajuda] Velocimetro - by Macintosh - 24.04.2011, 14:34
Re: [ajuda] Velocimetro - by Falcon. - 24.04.2011, 15:05
Re: [ajuda] Velocimetro - by LuxurioN™ - 24.04.2011, 16:05
Re: [ajuda] Velocimetro - by JOKERBOY - 24.04.2011, 21:17

Forum Jump:


Users browsing this thread: 1 Guest(s)