OnPlayerExitVehicle
From SA-MP Wiki
OnPlayerExitVehicle
This callback is called when a player exits a vehicle.
(playerid, vehicleid)
| playerid | ID of the player who exited the vehicle. |
| vehicleid | ID of the vehicle the player is exiting. |
Important Note: this is not called if the player falls off a bike or is removed from a vehicle by other means such as using SetPlayerPos
public OnPlayerExitVehicle(playerid, vehicleid) { new string[128]; format(string, sizeof(string), "INFO: You have exited vehicle %i", vehicleid); SendClientMessage(playerid, 0xFFFFFFFF, string); return 1; }
Related Callbacks
The following callbacks might be useful as well, as they're related to this callback in one way or another.
- OnPlayerEnterVehicle: Called when a player starts to enter a vehicle.
- OnPlayerStateChange: Called when a player changes state.
Related Functions
The following functions might be useful, as they're related to this callback in one way or another.
- RemovePlayerFromVehicle: Throw a player out of their vehicle.
- GetPlayerVehicleSeat: Check what seat a player is in.
