RemovePlayerFromVehicle
Description:
Function RemovePlayerFromVehicle removes/ejects a player from their vehicle.
|
Parameters:
(playerid)
int | playerid | The ID of the player to remove from their vehicle. |
Return Values:
- 1: The function was executed successfully.
- 0: The function failed to execute. This means the player is not connected.
Examples:
// Example - Players can only drive vehicles if they have 10 score. public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == PLAYER_STATE_DRIVER && GetPlayerScore(playerid) < 10) // PlAYER_STATE_DRIVER = 2 { RemovePlayerFromVehicle(playerid); } return 1; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- PutPlayerInVehicle: Put a player in a vehicle.