Vehicle update
#1

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).
Reply
#2

You forgot return 1; ?
Reply
#3

I tried to delete it earlier. I added it now and It doesn't work still.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)