I am currently writing a script and part of said script requires the player to be in water so it shows ox_lib’s prompt. Any ideas?
Have you tried
IsEntityInWater on the player ped?
How would I make that work though. Sorry, im extremely new to fivem coding and coding in general
if IsEntityInWater(PlayerPedId()) then
print("Hello I'm in the water")
I’m unsure though what that native exactly considers ‘in water’.
From the name of your file it seems you’re trying to call it server side, this is a client sided native
I added it to the client script. However when I go underwater/in water it doesnt actually print anything or do something.
You need to call it every frame or so i believe
put it in a thread with a wait of 0 or 1