GetPedOccupiedVehicleSeat: Difference between revisions
Jump to navigation
Jump to search
(New page: __NOTOC__ {{Server function}} This function gets the seat that a specific ped is sitting in in a vehicle. ==Syntax== <syntaxhighlight lang="lua">int getPedOccupiedVehicleSeat ( ped thePed )</syntaxhighlight> ===R...) |
m (→Example: Might as well get a Random Player) |
||
Line 13: | Line 13: | ||
==Example== | ==Example== | ||
This example finds what seat | This example finds what seat a random player is sitting in and outputs it to the chat box. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
thePed = | thePed = getRandomPlayer() | ||
theVehicle = getPedOccupiedVehicle ( thePed ) | theVehicle = getPedOccupiedVehicle ( thePed ) | ||
if ( theVehicle ) then | if ( theVehicle ) then |
Revision as of 19:11, 13 August 2012
This function gets the seat that a specific ped is sitting in in a vehicle.
Syntax
int getPedOccupiedVehicleSeat ( ped thePed )
Required Arguments
- thePed: The ped whose vehicle seat you're looking up.
Returns
Returns an integer containing the number of the seat that the ped is currently in, if any. Returns false if the ped is on foot, or the ped doesn't exist.
Example
This example finds what seat a random player is sitting in and outputs it to the chat box.
thePed = getRandomPlayer() theVehicle = getPedOccupiedVehicle ( thePed ) if ( theVehicle ) then outputChatBox ( "someguy is in a vehicle in seat number " .. getPedOccupiedVehicleSeat ( thePed ) .. "." ) else outputChatBox ( "someguy is not in a vehicle." ) end
See Also
- addPedClothes
- getPedClothes
- removePedClothes
- createPed
- getPedAmmoInClip
- getPedArmor
- getPedFightingStyle
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedStat
- getPedTarget
- getPedTotalAmmo
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponSlot
- getPedContactElement
- getValidPedModels
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- removePedFromVehicle
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedDoingGangDriveby
- setPedFightingStyle
- setPedHeadless
- setPedOnFire
- setPedStat
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle