getPedOxygenLevel | Multi Theft Auto: Wiki Skip to content

getPedOxygenLevel

Client-side
Server-side
Shared

Pair: setPedOxygenLevel

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function returns the current oxygen level of the specified ped.

Syntax

getPedOxygenLevel ( )

Code Examples

client

This 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