How to freeze oxygen/unlimited oxygen when diving

guys. i know how to getdivingplayer but i dont know how to set unlimited oxygen when player diving.
where is the codes that we can use ? library or something for unlimited health armor oxygen etc ?

i didnt find anything about unlimited oxygen in fivem wiki & native referances

// 0x6BA428C528D9E522 0x082EF240
// SetPedMaxTimeUnderwater
void SET_PED_MAX_TIME_UNDERWATER(Ped ped, float value);

hi where i put this code?

Hello , you can try this one , this is low resmon :

function FreezeOxygen
     local playerPed = PlayerPedId()
     SetPedDiesInWater(playerPed, false)
end
1 Like

hi, is possible to know where i search this or where i put?

where i put this?