setPedOxygenLevel | Multi Theft Auto: Wiki Skip to content

setPedOxygenLevel

Client-side
Server-side
Shared

Pair: getPedOxygenLevel

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 allows you to set the oxygen level of a ped.

Syntax

setPedOxygenLevel ( )

Code Examples

client

This example fills the local player's oxygen.

function fillOxygen ( command )
local maxOxygen = math.floor ( 1000 + getPedStat ( localPlayer, 22 ) * 1.5 + getPedStat ( localPlayer, 225 ) * 1.5 )
setPedOxygenLevel ( localPlayer, maxOxygen )
end
addCommandHandler ( "filloxygen", fillOxygen )

See Also