SA-MP Forums Archive
OnVehicleDamageStatusUpdateHealth does not apply on bikes. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: OnVehicleDamageStatusUpdateHealth does not apply on bikes. (/showthread.php?tid=417722)



OnVehicleDamageStatusUpdateHealth does not apply on bikes. - PaulDinam - 22.02.2013

public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
RepairVehicle(GetPlayerVehicleID(playerid));
return 1;
}

It works only on normal vehicles.


Re: OnVehicleDamageStatusUpdateHealth does not apply on bikes. - Hiddos - 22.02.2013

Have you tried popping the tires of the bike? OnVehicleDamageStatusUpdate only gets called when VISUAL damage is applied to a vehicle, like a door being banged up.

And bikes barely have any visual damage they can get, except for tire popping. I'm not too familiar with this callback though, try popping tires for both a bike and a car and see if the callback gets called both times


Re: OnVehicleDamageStatusUpdateHealth does not apply on bikes. - rbN. - 22.02.2013

And why are you using GetPlayerVehicleID(playerid) if you can use vehicleid?


Re: OnVehicleDamageStatusUpdateHealth does not apply on bikes. - PaulDinam - 22.02.2013

Oh shit forgot about the vehicleid, ima try now.

EDIT: Well, it's still doesn't work.. nevermind then


Re: OnVehicleDamageStatusUpdateHealth does not apply on bikes. - Jochemd - 22.02.2013

This callback isn't working on bikes and it never did afaik.


Re: OnVehicleDamageStatusUpdateHealth does not apply on bikes. - rbN. - 22.02.2013

Quote:
Originally Posted by PaulDinam
Посмотреть сообщение
Oh shit forgot about the vehicleid, ima try now.

EDIT: Well, it's still doesn't work.. nevermind then
It shouldn't fix it, because you don't know what OnVehicleDamageStatusUpdate does..

https://sampwiki.blast.hk/wiki/OnVehicleDamageStatusUpdate

"This callback is called when a vehicle element such as doors, tires, panels, or lights get damaged."
"This does not include vehicle health changes"