18.01.2012, 03:28
https://sampwiki.blast.hk/wiki/OnVehicleDeath
Isn't overly-specific. I'm quite sure that OnVehicleDeath is only called when a vehicle explodes, not when it falls into the water.
If you wish to check if a vehicle is in the water, an easy and not-so-reliable solution is to check if it's Z position is < 0 ("sea level"). Of course this does not account for other bodies of water that aren't the oceans of San Andreas.
Isn't overly-specific. I'm quite sure that OnVehicleDeath is only called when a vehicle explodes, not when it falls into the water.
If you wish to check if a vehicle is in the water, an easy and not-so-reliable solution is to check if it's Z position is < 0 ("sea level"). Of course this does not account for other bodies of water that aren't the oceans of San Andreas.