Huhuuu,
ja wie oben schon steht, zeigt mein Tacho kein Fahrzeughealth an...
Woran liegt das?
Hier mein Tacho-Public:
public Speedometer()
{
for(new playerid=0; playerid<MAX_PLAYERS; playerid++)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
new speed_string[255], kmh, vehicleid = GetPlayerVehicleID(playerid), modelid = GetVehicleModel(vehicleid);
new Float:chealth = GetVehicleHealth(vehicleid, chealth);
kmh = GetPlayerSpeed(playerid, true);
if(Tank[vehicleid] >= 5)
{
if(Motor[vehicleid] == false)
{
format(speed_string,255,"Geschwindigkeit: %d km/h~n~Tankinhalt: %d/%d Liter~n~Zustand: %.0f%%~n~Motor: ~r~Aus~n~~w~Fahrzeug: %s", kmh, Tank[vehicleid], MaxTank[GetVehicleModel(vehicleid)-400], floatround(chealth)/10, PlayerVehicle[modelid - 400]);
}
else
{
format(speed_string,255,"Geschwindigkeit: %d km/h~n~Tankinhalt: %d/%d Liter~n~Zustand: %.0f%%~n~Motor: ~g~An~n~~w~Fahrzeug: %s", kmh, Tank[vehicleid], MaxTank[GetVehicleModel(vehicleid)-400], floatround(chealth)/10, PlayerVehicle[modelid - 400]);
}
}
else
{
if(Motor[vehicleid] == false )
{
format(speed_string,255,"Geschwindigkeit: %d km/h~n~Tankinhalt: ~r~%d~w~/%d Liter~n~Zustand: %.0f%%~n~Motor: ~r~Aus~n~~w~Fahrzeug: %s", kmh, Tank[vehicleid], MaxTank[GetVehicleModel(vehicleid)-400], floatround(chealth)/10, PlayerVehicle[modelid - 400]);
}
else
{
format(speed_string,255,"Geschwindigkeit: %d km/h~n~Tankinhalt: ~r~%d~w~/%d Liter~n~Zustand: %.0f%%~n~Motor: ~g~An~n~~w~Fahrzeug: %s", kmh, Tank[vehicleid], MaxTank[GetVehicleModel(vehicleid)-400], floatround(chealth)/10, PlayerVehicle[modelid - 400]);
}
}
TextDrawSetString(Tacho[playerid], speed_string);
}
else
{
TextDrawHideForPlayer(playerid, Tacho[playerid]);
}
}
}
return 1;
}
{
for(new playerid=0; playerid<MAX_PLAYERS; playerid++)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
new speed_string[255], kmh, vehicleid = GetPlayerVehicleID(playerid), modelid = GetVehicleModel(vehicleid);
new Float:chealth = GetVehicleHealth(vehicleid, chealth);
kmh = GetPlayerSpeed(playerid, true);
if(Tank[vehicleid] >= 5)
{
if(Motor[vehicleid] == false)
{
format(speed_string,255,"Geschwindigkeit: %d km/h~n~Tankinhalt: %d/%d Liter~n~Zustand: %.0f%%~n~Motor: ~r~Aus~n~~w~Fahrzeug: %s", kmh, Tank[vehicleid], MaxTank[GetVehicleModel(vehicleid)-400], floatround(chealth)/10, PlayerVehicle[modelid - 400]);
}
else
{
format(speed_string,255,"Geschwindigkeit: %d km/h~n~Tankinhalt: %d/%d Liter~n~Zustand: %.0f%%~n~Motor: ~g~An~n~~w~Fahrzeug: %s", kmh, Tank[vehicleid], MaxTank[GetVehicleModel(vehicleid)-400], floatround(chealth)/10, PlayerVehicle[modelid - 400]);
}
}
else
{
if(Motor[vehicleid] == false )
{
format(speed_string,255,"Geschwindigkeit: %d km/h~n~Tankinhalt: ~r~%d~w~/%d Liter~n~Zustand: %.0f%%~n~Motor: ~r~Aus~n~~w~Fahrzeug: %s", kmh, Tank[vehicleid], MaxTank[GetVehicleModel(vehicleid)-400], floatround(chealth)/10, PlayerVehicle[modelid - 400]);
}
else
{
format(speed_string,255,"Geschwindigkeit: %d km/h~n~Tankinhalt: ~r~%d~w~/%d Liter~n~Zustand: %.0f%%~n~Motor: ~g~An~n~~w~Fahrzeug: %s", kmh, Tank[vehicleid], MaxTank[GetVehicleModel(vehicleid)-400], floatround(chealth)/10, PlayerVehicle[modelid - 400]);
}
}
TextDrawSetString(Tacho[playerid], speed_string);
}
else
{
TextDrawHideForPlayer(playerid, Tacho[playerid]);
}
}
}
return 1;
}
Freue mich über jede Hilfe!
lg
Zinne