Vehicle update - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Vehicle update (
/showthread.php?tid=477523)
Vehicle update -
SweetCZ - 24.11.2013
Hello guys, I have problem with my public VehicleUpdate -
Код:
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]);
}
}
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
Код:
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);
Thanks for every help and sorry for my bad english (I am from the Czech republic).
Re: Vehicle update -
Zues - 24.11.2013
You forgot return 1; ?
Re: Vehicle update -
SweetCZ - 24.11.2013
I tried to delete it earlier. I added it now and It doesn't work still.