GetPedOxygenLevel
From Multi Theft Auto: Wiki
This function returns the current oxygen level of the specified ped.
Syntax
float getPedOxygenLevel ( ped thePed )
OOP Syntax Help! I don't understand this!
- Method: ped:getOxygenLevel(...)
- Variable: .oxygenLevel
- Counterpart: setPedOxygenLevel
Required Arguments
- thePed: The ped whose oxygen level you want to check
Returns
A float with the oxygen level, false if an invalid ped was given.
Example
Click to collapse [-]
ClientThis example defines a "showoxygen" console command that shows the player that executes it which oxygen level he has.
function showOxygen ( command ) local oxygen = getPedOxygenLevel ( localPlayer ) outputChatBox( "Your oxygen level: " .. oxygen ) end addCommandHandler ( "showoxygen", showOxygen )
See Also
- getPedAmmoInClip
- getPedAnalogControlState
- getPedAnimation
- getPedArmor
- getPedBonePosition
- getPedCameraRotation
- getPedClothes
- getPedContactElement
- getPedControlState
- getPedFightingStyle
- getPedMoveState
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedOxygenLevel
- getPedSimplestTask
- getPedStat
- getPedTarget
- getPedTargetCollision
- getPedTargetEnd
- getPedTargetStart
- getPedTask
- getPedTotalAmmo
- getPedVoice
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponMuzzlePosition
- getPedWeaponSlot
- getValidPedModels
- givePedWeapon
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDoingTask
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- removePedClothes
- removePedFromVehicle
- setAnalogControlState
- setPedAimTarget
- setPedAnalogControlState
- setPedAnimation
- setPedAnimationProgress
FROM VERSION 1.5.7 r19626 ONWARDS
FROM VERSION 1.5.7 r19626 ONWARDS
- setPedFootBloodEnabled
- setPedHeadless
- setPedLookAt
- setPedOnFire
- setPedOxygenLevel
- setPedStat
- setPedTargetingMarkerEnabled
- setPedVoice
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle