From SA-MP Wiki

Jump to: navigation, search


This callback is called when a player starts to exit a vehicle.

(playerid, vehicleid)
playeridThe ID of the player that is exiting a vehicle.
vehicleidThe ID of the vehicle the player is exiting.

Return Values:

This callback does not handle returns.
  • It is always called first in filterscripts.



Not called if the player falls off a bike or is removed from a vehicle by other means such as using SetPlayerPos.

You must use OnPlayerStateChange and check if their old state is PLAYER_STATE_DRIVER or PLAYER_STATE_PASSENGER and their new state is PLAYER_STATE_ONFOOT.

Example Usage:

public OnPlayerExitVehicle(playerid, vehicleid)
    new string[35];
    format(string, sizeof(string), "INFO: You are exiting vehicle %i", vehicleid);
    SendClientMessage(playerid, 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.

Related Functions

The following functions might be useful, as they're related to this callback in one way or another.

In other languages