24.11.2013, 15:33
Hello guys, I have problem with my public VehicleUpdate -
It doesn't work - textdraw doesn't show.
I tried to repair it by prints but it doesn't work still.
When I tried that everything was in the command prompt but it stopped when it called
Thanks for every help and sorry for my bad english (I am from the Czech republic).
Код:
public VehicleUpdate(playerid) { if(IsPlayerInAnyVehicle(playerid)) { new vehicleid = GetPlayerVehicleID(playerid); new Float:health, speed; GetVehicleHealth(vehicleid, health); floatround(health, floatround_round); speed = GetPlayerSpeed(playerid, true); new update[200]; format(update, sizeof(update), "~b~~h~Model: %s~n~Stav: %f%s~n~Benzin: %dl~n~Rychlost: %dkm/h", SeznamAut[vehicleid-400], health / 10, "%%", Fuel[vehicleid], speed); PlayerTextDrawSetString(playerid, VehicleStats[playerid], update); PlayerTextDrawShow(playerid, VehicleStats[playerid]); } }
I tried to repair it by prints but it doesn't work still.
When I tried that everything was in the command prompt but it stopped when it called
Код:
format(update, sizeof(update), "~b~~h~Model: %s~n~Stav: %f%s~n~Benzin: %dl~n~Rychlost: %dkm/h", SeznamAut[vehicleid-400], health / 10, "%%", Fuel[vehicleid], speed);