local cam_x, cam_y, cam_z = getActiveCameraCoordinates()
local width, heigth = convertGameScreenCoordsToWindowScreenCoords(339.1, 179.1)
local aim_x, aim_y, aim_z = convertScreenCoordsToWorld3D(width, heigth, 100)
local result, colPoint = processLineOfSight(cam_x, cam_y, cam_z, aim_x, aim_y, aim_z, false, false, true, false, false, false, false)
if result then
if isLineOfSightClear(cam_x, cam_y, cam_z, colPoint.pos[1], colPoint.pos[2], colPoint.pos[3], true, true, false, true, true) then
if colPoint.entityType == 3 then
if getCharPointerHandle(colPoint.entity) ~= playerPed then
setGameKeyState(17, 255)
sampAddChatMessage(111, -1)
end
end
end
end
end