OnVehicleDeath
From SA-MP Wiki
(Difference between revisions)
Revision as of 17:56, 4 September 2013 Smithy (Talk | contribs) ← Previous diff |
Revision as of 04:50, 2 February 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 29: | Line 29: | ||
[[Category:Scripting Callbacks]] | [[Category:Scripting Callbacks]] | ||
- | [[de:OnVehicleDeath]] | ||
[[es:OnVehicleDeath]] | [[es:OnVehicleDeath]] | ||
+ | [[de:OnVehicleDeath]] | ||
+ | [[fr:OnVehicleDeath]] | ||
[[ru:OnVehicleDeath]] | [[ru:OnVehicleDeath]] |
Revision as of 04:50, 2 February 2014
Description:
This callback is called when a vehicle is destroyed - either by exploding or becoming submerged in water.
(vehicleid, killerid)
vehicleid | The ID of the vehicle that was destroyed. |
killerid | The ID of the player that reported (synced) the vehicle's destruction (name is misleading). Generally the driver or a passenger (if any) or the closest player. |
Return Values:
This function does not return any specific values.
public OnVehicleDeath(vehicleid, killerid) { new string[40]; format(string, sizeof(string), "Vehicle %i was destroyed. Reported by player %i.", vehicleid, killerid); SendClientMessageToAll(0xFFFFFFFF, string); return 1; }
Related Callbacks
The following callbacks might be useful as well, as they are related to this callback in one way or another.
- OnVehicleSpawn: Called when a vehicle respawns.
Related Functions
The following functions might be useful, as they're related to this callback in one way or another.
- SetVehicleHealth: Set the health of a vehicle.