[Ajuda] Velocнmetro nгo aparece
#8

PHP код:
public OnGameModeInit()
{
     
SetTimer("Velocimentro"300true);
     return 
1;
}
forward Velocimetro();
public 
Velocimetro()
{
    new 
FloatSpeedo_HP;
    new 
str1[128], str2[128], str3[128], str4[128];
    new 
GasEtempo[MAX_PLAYERS], ResultOwn[MAX_PLAYERS];
    for (new 
0MaiorIDi++)
    {
        new 
vehicle GetPlayerVehicleID(i);
        
GetVehicleHealth(vehicleSpeedo_HP);
        if (
gPlayerLogged[i] == && IsPlayerInAnyVehicle(i))
        {
            if (
TextShow[i] == false)
            {
                
TextDrawShowForPlayer(ibox);
                
TextDrawShowForPlayer(ibox1);
                
TextDrawShowForPlayer(ibox2);
                
TextDrawShowForPlayer(ibox3);
                
TextDrawShowForPlayer(ibox4);
                
TextDrawShowForPlayer(ibox5);
                
TextDrawShowForPlayer(iVeInfo[i]);
                
TextDrawShowForPlayer(ikmhor[i]);
                
TextDrawShowForPlayer(iGazoInfo[i]);
                
TextDrawShowForPlayer(iLataInfo[i]);
                
//TextDrawShowForPlayer(i, TempoGasInfo[i]);
                
TextDrawShowForPlayer(iLocalInf[i]);
                
TextDrawShowForPlayer(iSpedUrl);
                
TextShow[i] = true;
            }
            
//veiculo
            
format(str1sizeof(str1), "~w~Veiculo:~g~~h~~h~ %s"vehName[GetVehicleModel(GetPlayerVehicleID(i)) - 400]);
            
TextDrawSetString(VeInfo[i], str1);
/*if(GetPlayerSpeed(i, true) >= 150)
            {
                format(str2,sizeof(str2),"~>~~w~Velocidade: ~r~%d KM/H",GetPlayerSpeed(i, true));
                TextDrawSetString(kmhor[i], str2);
             }  */
            //velocidade
            
if (GetPlayerSpeed(itrue) >= 150)
            {
                
format(str2sizeof(str2), "~w~Velocidade:~w~ %d ~r~~h~KM/H"GetPlayerSpeed(itrue));
                
TextDrawSetString(kmhor[i], str2);
            }
            else
            {
                
format(str2sizeof(str2), "~w~Velocidade:~w~ %d ~g~~h~~h~KM/H"GetPlayerSpeed(itrue));
                
TextDrawSetString(kmhor[i], str2);
            }
            
// Start do carro
            
if (Speedo_HP >= 551)
            {
                
format(str4sizeof(str4), "~w~Lataria:~w~ %0.0f%%"Speedo_HP 10);
                
TextDrawSetString(LataInfo[i], str4);
            }
            else if (
Speedo_HP >= 361)
            {
                
format(str4sizeof(str4), "~w~Lataria:~w~ %0.0f%%"Speedo_HP 10);
                
TextDrawSetString(LataInfo[i], str4);
            }
            else
            {
                
format(str4sizeof(str4), "~w~Lataria:~r~~h~ %0.0f%%"Speedo_HP 10);
                
TextDrawSetString(LataInfo[i], str4);
            }
            
// inf tempo gas
            
GasEtempo[i] = Gas[vehicle] * 18;
            
ResultOwn[i] = GasEtempo[i] / 60;
            if (
ResultOwn[i] > 5)
            {
                
format(str4sizeof(str4), "~w~Gas Tempo:~w~ %d ~g~~h~~h~Min"ResultOwn[i]);
                
TextDrawSetString(TempoGasInfo[i], str4);
            }
            else
            {
                
format(str4sizeof(str4), "~w~Gas Tempo:~w~ %d ~g~~h~~h~Min"ResultOwn[i]);
                
TextDrawSetString(TempoGasInfo[i], str4);
            }
            
// combustivel
            
if (Gas[vehicle] >= 20)
            {
                
format(str3sizeof(str3), "~w~Combustivel:~w~ %d"Gas[vehicle]);
                
TextDrawSetString(GazoInfo[i], str3);
            }
            else if (
Gas[vehicle] < 20)
            {
                
format(str3sizeof(str3), "~w~Combustivel:~w~ %d"Gas[vehicle]);
                
TextDrawSetString(GazoInfo[i], str3);
            }
            else
            {
                
format(str3sizeof(str3), "~b~~h~~h~~h~Combustivel:~r~~h~ %d"Gas[vehicle]);
                
TextDrawSetString(GazoInfo[i], str3);
            }
            
format(str4sizeof(str4), "~b~~h~~h~~h~Local: ~w~%s"ReturnPlayerZone(i));
            
TextDrawSetString(LocalInf[i], str4);
        }
        else
        {
            if (
TextShow[i] == true)
            {
                
TextDrawHideForPlayer(ibox);
                
TextDrawHideForPlayer(ibox1);
                
TextDrawHideForPlayer(ibox2);
                
TextDrawHideForPlayer(ibox3);
                
TextDrawHideForPlayer(ibox4);
                
TextDrawHideForPlayer(ibox5);
                
TextDrawHideForPlayer(itacho[i]);
                
TextDrawHideForPlayer(iVeInfo[i]);
                
TextDrawHideForPlayer(ikmhor[i]);
                
TextDrawHideForPlayer(iGazoInfo[i]);
                
TextDrawHideForPlayer(iLataInfo[i]);
                
TextDrawHideForPlayer(iTempoGasInfo[i]);
                
TextDrawHideForPlayer(iLocalInf[i]);
                
TextDrawHideForPlayer(iSpedUrl);
                
TextShow[i] = false;
            }
        }
    }

Reply


Messages In This Thread
Velocнmetro nгo aparece - by marcos_orkut - 02.07.2015, 01:25
Re: Velocнmetro nгo aparece - by IgorLuiz - 02.07.2015, 01:32
Re: Velocнmetro nгo aparece - by marcos_orkut - 02.07.2015, 02:11
Re: Velocнmetro nгo aparece - by IgorLuiz - 02.07.2015, 02:16
Re: Velocнmetro nгo aparece - by marcos_orkut - 02.07.2015, 02:33
Re: Velocнmetro nгo aparece - by IgorLuiz - 02.07.2015, 02:39
Re: Velocнmetro nгo aparece - by marcos_orkut - 02.07.2015, 03:00
Re: Velocнmetro nгo aparece - by Pablo098 - 02.07.2015, 11:02

Forum Jump:


Users browsing this thread: 2 Guest(s)