Guten Abend,
Warum wird die Frabe der Textdraws nicht geändernt:
Hier das public:
public Speedometer(playerid)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && IsPlayerInAnyVehicle(playerid))
{
new vehicleid = GetPlayerVehicleID(playerid),kmhstr[20],hpstr[20],gasstr[20];
new string[128],Float:vHealth,kmh = GetPlayerSpeed(playerid);
if(kmh >= 80)
{
format(kmhstr,sizeof kmhstr, "~r~%i",kmh);
}
else
{
format(kmhstr,sizeof kmhstr, "~g~%i",kmh);
}
if(VehicleGas[vehicleid] <= 10)
{
format(gasstr,sizeof gasstr, "~r~%i",VehicleGas[vehicleid]);
}
else
{
format(gasstr,sizeof gasstr, "~g~%i",VehicleGas[vehicleid]);
}
if(vHealth <= 300)
{
format(hpstr,sizeof hpstr, "~r~%.1f",vHealth);
}
else
{
format(hpstr,sizeof hpstr, "~g~%.1f",vHealth);
}
GetVehicleHealth(vehicleid,vHealth);
format(string, 128, "%s~n~%s~n~0~n~%s~n~",kmhstr,gasstr,hpstr);
TextDrawSetString(Tacho[playerid][1],string);
TextDrawShowForPlayer(playerid, Tacho[playerid][1]);
}
return 1;
}