Posts: 887
Threads: 251
Joined: Jun 2011
Reputation:
0
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
RepairVehicle(GetPlayerVehicleID(playerid));
return 1;
}
It works only on normal vehicles.
Posts: 3,304
Threads: 58
Joined: Sep 2008
Reputation:
0
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
Posts: 1,079
Threads: 64
Joined: Jan 2010
And why are you using GetPlayerVehicleID(playerid) if you can use vehicleid?
Posts: 887
Threads: 251
Joined: Jun 2011
Reputation:
0
Oh shit forgot about the vehicleid, ima try now.
EDIT: Well, it's still doesn't work.. nevermind then
Posts: 2,220
Threads: 154
Joined: Jul 2009
Reputation:
0
This callback isn't working on bikes and it never did afaik.
Posts: 1,079
Threads: 64
Joined: Jan 2010
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"