Basically I have a while loop checking to see if there is on water or not… but no matter what I use for entity nothing works look:
function LocalPed()
return GetPlayerPed(-1)
end
Citizen.CreateThread(function()
while true do
Wait(0)
drawNotification('TESTING WHILE LOOP NOTHING TO SEE HERE LUL',0,1,0.5,0.8,0.6,255,255,255,255)
local player = LocalPed()
if IsEntityInWater(LocalPed(), true) == true then
drawTxt('PLAYER IS IN WATER',0,1,0.5,3.8,0.6,255,255,255,255)
end
end
end)
I have tried the native:
if Citizen.InvokeNative(0xCFB0A0D8EDD145A3, Citizen.PointerValueIntInitialized(LocalPed())) == true then
I tried using player, localPed(), removing the, true inside the function… nothing
I can’t get this to work =/ does anybody here know what I am doing wrong?