OnPlayerExitVehicle
From SA-MP Wiki
(Difference between revisions)
Revision as of 15:14, 23 February 2013 Mauzen (Talk | contribs) (German page hint) ← Previous diff |
Revision as of 04:24, 5 February 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
{{Scripting}} | {{Scripting}} | ||
- | {{Title}} | ||
{{Description|This callback is called when a player exits a vehicle.}} | {{Description|This callback is called when a player exits a vehicle.}} | ||
Line 34: | Line 33: | ||
[[de:OnPlayerExitVehicle]] | [[de:OnPlayerExitVehicle]] | ||
+ | [[fr:OnPlayerExitVehicle]] |
Revision as of 04:24, 5 February 2014
Description:
This callback is called when a player exits a vehicle.
(playerid, vehicleid)
playerid | The ID of the player who exited the vehicle. |
vehicleid | The ID of the vehicle the player is exiting. |
Return Values:
This callback does not handle returns.
Important | 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. |
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.
- 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.