ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setPedOxygenLevel

Function

setPedOxygenLevel

ServerPedsIdentical to MTA:SA

Stores a ped's underwater oxygen on a 0-1000 scale (1000 = full lungs). In Trilogy Hub this is state for scripts returned by getPedOxygenLevel; the in-game oxygen bar does not change. Values outside 0-1000 are rejected.

Syntax

bool setPedOxygenLevel(ped ped, float value)

Arguments

pedped
A player or an NPC.
valuefloat
Oxygen 0-1000.

Returns

true on success.

Example

setPedOxygenLevel(player, 1000)

Notes

State for scripts.

See also