Speedometer problem
#2

PHP код:
public Velocimetro()
{
    foreach(
Playeri)
    {
        new 
aname[MAX_PLAYER_NAME];
        
GetPlayerName(ianameMAX_PLAYER_NAME);
        if(
IsPlayerInAnyVehicle(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
        {
            new 
Float:XFloat:YFloat:ZFloat:Speed;
            
GetVehicleVelocity(GetPlayerVehicleID(i), XYZ);
            
Speed floatmul(floatsqroot(floatadd(floatadd(floatpower(X2), floatpower(Y2)),  floatpower(Z2))), 170.0);
            new 
Float:vcarro;
            
GetVehicleHealth(GetPlayerVehicleID(i), vcarro);
            new 
velocid;
            
velocid floatround(Speedfloatround_floor);
            new 
string[128];
            new 
PlayerVehicleModelID GetVehicleModel(GetPlayerVehicleID(i));
            
PlayerVehicleModelID -= 400;
            new 
ncarro[30];


            if(
velocid == 300)
            {
                
SetTimerEx("remove it"1000false"i"i);
            }
            if(
velocid == 350)
            {
                
SetTimerEx("remove it"1000false"i"i);
            }
            if(
velocid == 380)
            {
                
SetTimerEx("remove it"1000false"i"i);
            }
            if(
velocid 385)
            {
                
SetTimerEx("banspeed"100false"i"i);
            }

            
format(ncarro,30,PlayerVehicle[PlayerVehicleModelID]);
            
GetPlayer2DZone(izoneMAX_ZONE_NAME);
            
format(string128,"%i",velocid); //~y~Km/h
            
TextDrawSetString(velo[i],string);
            
// PLAYER VEHICLE
            
format(ncarro,30,PlayerVehicle[PlayerVehicleModelID]);
            
GetPlayer2DZone(izoneMAX_ZONE_NAME);
            
format(string,sizeof(string),"~b~%s",PlayerVehicle[PlayerVehicleModelID]);
            
TextDrawSetString(Veiculo[i], string);
            
// PLAYER VEHICLE
            // LOCATION SPEEDOMETER
            
format(ncarro,30,PlayerVehicle[PlayerVehicleModelID]);
            
GetPlayer2DZone(izoneMAX_ZONE_NAME);
            
format(string,sizeof(string),"~w~%s"zone);
            
TextDrawSetString(Localidades[i], string);
            
// KM / H
            
format(ncarro,30,PlayerVehicle[PlayerVehicleModelID]);
            
GetPlayer2DZone(izoneMAX_ZONE_NAME);
            
format(string,sizeof(string),"~y~KM/H"); //~y~~i~/~y~
            
TextDrawSetString(Kmhstring);
            
Radar(i);
            
TextDrawShowForPlayer(ivelo[i]);
            
TextDrawShowForPlayer(iVeiculo[i]);
            
TextDrawShowForPlayer(iLocalidades[i]);
            
TextDrawShowForPlayer(iKmh);
            }else{
            
TextDrawHideForPlayer(ivelo[i]),TextDrawHideForPlayer(iVeiculo[i]),TextDrawHideForPlayer(iKmh),TextDrawHideForPlayer(iLocalidades[i]);
        }
    }
    return 
1;

Reply


Messages In This Thread
Speedometer problem - by Leonaardo - 04.11.2017, 04:50
Re: Speedometer problem - by StrikerZ - 04.11.2017, 05:06
Re: Speedometer problem - by Leonaardo - 04.11.2017, 05:44

Forum Jump:


Users browsing this thread: 1 Guest(s)