Hey,
im trying to get this function to work. But it is not detecting me pressing E.
This is my script:
while true do
local coords = GetEntityCoords(ped)
Citizen.Wait(55)
if Vdist(coords, location) < 15 then
isNear = true
if Vdist(coords,location) < 3 then
if IsControlJustReleased(2, 38) then
print("E Presses")
end
end
else
isNear = false
end
end
Can someone help me? I tried to google it but it didnt work.
EDIT: When I spam E then it takes a input. How can I avoid this?