Hello, im trying to be able to click on entity with mouse and get that entity ID, converting 2d coords to 3d coords or raycast from mouse if possible.
Any idea how i can convert 2d to 3d using GetCursor()
function GetCursor()
local sx, sy = GetActiveScreenResolution()
local cx, cy = GetNuiCursorPosition()
local cx, cy = (cx / sx) + 0.008, (cy / sy) + 0.027
return cx, cy
end
Or is there a other way to make it simpler?