PutPlayerInVehicle
From SA-MP Wiki
(Difference between revisions)
Revision as of 16:35, 28 October 2013 Badio12 (Talk | contribs) ← Previous diff |
Revision as of 04:33, 2 February 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
{{Scripting}} | {{Scripting}} | ||
- | {{Title}} | ||
- | |||
{{Description|Puts a player in a vehicle}} | {{Description|Puts a player in a vehicle}} | ||
Line 42: | Line 40: | ||
[[Category:Scripting Functions]] | [[Category:Scripting Functions]] | ||
- | [[pt:PutPlayerInVehicle]] | + | |
+ | [[fr:PutPlayerInVehicle]] | ||
[[it:PutPlayerInVehicle]] | [[it:PutPlayerInVehicle]] | ||
+ | [[pt:PutPlayerInVehicle]] | ||
[[ru:PutPlayerInVehicle]] | [[ru:PutPlayerInVehicle]] |
Revision as of 04:33, 2 February 2014
Description:
Puts a player in a vehicle
(playerid,vehicleid,seatid)
playerid | The ID of the player to put in a vehicle |
vehicleid | The ID of the vehicle for the player to be put in |
seatid | The ID of the seat to put the player in |
Return Values:
This function does not return any specific values.
Seats:
0 - Driver 1 - Front Passenger 2 - Back left passenger 3 - Back right passenger 4+ - Passenger seats (coach etc.)
public OnPlayerEnterVehicle(playerid,vehicleid,ispassanger) { PutPlayerInVehicle(playerid, vehicleid, 0); return 1; }
TIP: Use GetPlayerVehicleSeat in a loop to check if a seat is available.
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- RemovePlayerFromVehicle: Throw a player out of their vehicle.
- GetPlayerVehicleID: Get the ID of the vehicle the player is in.
- GetPlayerVehicleSeat: Check what seat a player is in.
Related Callbacks
The following callbacks might be useful, as they're related to this function in one way or another.
- OnPlayerEnterVehicle: Called when a player starts to enter a vehicle.