Vehicle::getPedInSeat: Difference between revisions

From RAGE Multiplayer Wiki
(Added some info)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
-1 (driver) <= index < GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(vehicle)
-1 (driver) <= index < GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(vehicle)
'''If a player enters the driver seat from the passenger side, getPedInSeat(-1) will return 0 until the player actually reaches the seat.'''
'''If a player enters the driver seat from the passenger side, getPedInSeat(-1) will return 0 until the player actually reaches the seat.'''
==Syntax==
==Syntax==
#Information : It will crash client-side if you try to getPedInSeat for a trailer model vehicle
<syntaxhighlight lang="javascript">vehicle.getPedInSeat(index);</syntaxhighlight>
<syntaxhighlight lang="javascript">vehicle.getPedInSeat(index);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
Line 7: Line 9:
===Return value===
===Return value===
*'''Ped handle or object'''
*'''Ped handle or object'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">

Latest revision as of 09:46, 20 July 2021

-1 (driver) <= index < GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(vehicle)

If a player enters the driver seat from the passenger side, getPedInSeat(-1) will return 0 until the player actually reaches the seat.

Syntax

  1. Information : It will crash client-side if you try to getPedInSeat for a trailer model vehicle
vehicle.getPedInSeat(index);

Required Arguments

  • index: int

Return value

  • Ped handle or object

Example

// todo

See also