Hello everyone
Does anybody have an idea on how (and where) can i put a code/natives to increase the breathing duration underwater ?
I find that the time underwater is too short and we die too quickly … (Except using Oxygen Bottle,etc…)
Thanks for your help
Hey !
https://runtime.fivem.net/doc/natives/?_0x6BA428C528D9E522
void SET_PED_MAX_TIME_UNDERWATER(Ped ped, float value);
SetPedMaxTimeUnderwater(GetPlayerPed(-1), yourfloatvalue)
There is not much documentation on it, so you might want to do some test !
1 Like
Gonna try that
Thank you very much Cookay
No problem, don’t forget to come back and tell us if it did works
And mark as solution if you can
Have a great day sir !
1 Like
Works Like a charm, thank you again
Great day to you too
pajkke
April 14, 2021, 12:00pm
7
Hello.
I’m trying to get the same thing working but i have some problems.
My code:
underwater2 = SetPedMaxTimeUnderwater(GetPlayerPed(-1), 100)
When i use this code the player underwater time just freezes at 0, i’m trying to set it to 100.
Any solution would be helpfull, thanks!
@Cookay
@Scapin
try underwater2 = SetPedMaxTimeUnderwater(PlayerPedId(), 100.00)
3 Likes
pajkke
April 14, 2021, 12:17pm
9
Sir, you are an legend!
This finally works, i’ve been trying to fix this for hours now.
Thank you so much for help!
@KoolllAiidddd
1 Like
Always look at the type of the numbers. Here it was float so your number needs to be like 100.0 , if it was a normal int or number it should be 100. You can see them in document page
1 Like
Vihtal
September 19, 2021, 4:52pm
11
where would i insert this line of code at? sorry im a newb
I have been stuck on this for months. I havent been able to figure out how to install this or add this script for the life of me. Every time I think ive done it right im nowhere near fixing it. Can someone please give me a step by step how to increase my breath underwater? Im at my wits end lol
hey bro where does this get placed ive been looking around forums for hours for the spot
If you are on QB try qb-diving\client\main.lua
where can i put this code?