vehicle theVehicle, int seat
- theVehicle: The vehicle that the ped exited.
- seat: The number of the seat that the ped was sitting on.
This example will immediately delete any vehicle a ped exits if the vehicle's health is below 500:
function deleteVehicleOnExit (theVehicle, seat) local vehHealth = getElementHealth (theVehicle) if vehHealth < 500 then destroyElement (theVehicle) end end addEventHandler ("onClientPedVehicleExit", root, deleteVehicleOnExit)
|Minimum server version||n/a|
|Minimum client version||1.5.8-9.20740|
Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.5.8-9.20740" />
Client ped events