OnVehicleDamageStatusUpdateHealth does not apply on bikes.
#1

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

It works only on normal vehicles.
Reply
#2

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
Reply
#3

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

Oh shit forgot about the vehicleid, ima try now.

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

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

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"
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)