29.06.2016, 21:04
See: https://sampwiki.blast.hk/wiki/OnVehicleDeath
Note:
This callback will also be called when a vehicle enters water, but the vehicle can be saved from destruction by teleportation or driving out (if only partially submerged). The callback won't be called a second time, and the vehicle may disappear when the driver exits, or after a short time.
OR See: https://sampwiki.blast.hk/wiki/OnVehicleDamageStatusUpdate
pawn Код:
public OnVehicleDeath(vehicleid, killerid)
{
SetVehicleHealth(vehicleid, 1000.0);
return 1;
}
This callback will also be called when a vehicle enters water, but the vehicle can be saved from destruction by teleportation or driving out (if only partially submerged). The callback won't be called a second time, and the vehicle may disappear when the driver exits, or after a short time.
OR See: https://sampwiki.blast.hk/wiki/OnVehicleDamageStatusUpdate
pawn Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
new Float:health;
GetVehicleHealth(vehicleid, health);
if(health <= 250.0)
SetVehicleHealth(vehicleid, 1000.0);
return 1;
}