Hallo ich hab ein bug bei mein km/h anzeige da steht immer 5577550 km/h soger wen ich nur stehe
public UpdateSpeed()
{
//new Float:x, Float:y, Float:z;
new string[256];
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
new const vehicleid = GetPlayerVehicleID(i);
hier genau das gleiche //new Vehicle = GetPlayerVehicleID(i);
wenn ich die 2 striche weg tuhe kommt errr //new Float:speed = GetVehicleSpeed_P(i);
new Float:memory[3]={0.00,0.00,0.00 };
new Float:CarHealth;
GetVehicleHealth(vehicleid, CarHealth);
CarHealth = CarHealth -250;
CarHealth = CarHealth/10;
CarHealth = CarHealth /75;
CarHealth = CarHealth *100;
new CarHealthIni =floatround(CarHealth, floatround_floor);
if(CarHealthIni < 0){ CarHealthIni = 0;}
GetVehicleVelocity(vehicleid, memory[0], memory[1], memory[2]);
new speed = speed/2;
format(string, sizeof(string), "%d km/h", floatround(speed));
TextDrawSetString(Speedo5[i], string);
new model = GetVehicleModel(GetPlayerVehicleID(i));
if(!IsAFahrrad(model))
{
format(string, sizeof(string), "%d/%d", gGas[vehicleid], gMaxGas[vehicleid]);
TextDrawSetString(Speedo6[i], string);
}
else
{
format(string, sizeof(string), "--/--");
TextDrawSetString(Speedo6[i], string);
}
format(string, sizeof(string), "%d\%", CarHealthIni);
TextDrawSetString(Speedo7[i], string);
format(string, sizeof(string), "%s", CarName[model-400]);
TextDrawSetString(Speedo4[i], string);
}
}
}
kann mir bitte einer helfen