[Ajuda] Velocimetro
#8

PHP код:
public Speedo()
{
    for(new 
playerid=0;playerid<MAX_PLAYERS;playerid++)
    {
        if(
IsPlayerConnected(playerid) && IsPlayerInAnyVehicle(playerid))
        {
            
//CHECAR VELOCIDADE
            
new string[228];
            
format(string,sizeof(string),"%02d Km/H",GetVehicleSpeed(playervehicle));
            
TextDrawSetString(Text:Textdraw91string);
            
TextDrawShowForPlayer(playeridTextdraw91);
            
//CHECAR LATARIA
            
GetVehicleHealth(GetPlayerVehicleID(playerid), Lataria);
            
format(string,sizeof(string),"Lataria: %0.0f%%"Lataria);
            
TextDrawSetString(Textdraw131string);
            
//CHECAR VEICULO
            
format(string,sizeof(string),"Veiculo: %s"Veiculos[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
            
TextDrawSetString(Textdraw141string);
            
// Checar gasolina
            
format(string,sizeof(string),"Gasolina: %d%"Gas[GetPlayerVehicleID(playerid)]);
            
TextDrawSetString(Textdraw101string);
        }
    }
}
stock GetVehicleSpeed(vehicleid)
{
        new 
Float:xPos[3];
        
GetVehicleVelocity(vehicleidxPos[0], xPos[1], xPos[2]);
        return 
floatround(floatsqroot(xPos[0] * xPos[0] + xPos[1] * xPos[1] + xPos[2] * xPos[2]) * 170.00);

Reply


Messages In This Thread
Velocimetro - by MatheusAlcapone - 16.10.2012, 01:00
Re: Velocimetro - by zSuYaNw - 16.10.2012, 01:19
Re: Velocimetro - by MatheusAlcapone - 16.10.2012, 01:27
Re: Velocimetro - by zSuYaNw - 16.10.2012, 01:31
Re: Velocimetro - by MatheusAlcapone - 16.10.2012, 01:37
Re: Velocimetro - by zSuYaNw - 16.10.2012, 01:40
Re: Velocimetro - by MatheusAlcapone - 16.10.2012, 01:46
Re: Velocimetro - by ApocaSamp - 16.04.2016, 07:22
Re: Velocimetro - by HaRdiiZin - 16.04.2016, 12:09
Re: Velocimetro - by F1N4L - 16.04.2016, 12:22

Forum Jump:


Users browsing this thread: 1 Guest(s)