Rechange the script
function crosshair ()
if getPedOccupiedVehicle(localPlayer) then
if getElementModel(getPedOccupiedVehicle(localPlayer)) == 520 then
--there local veh = getPedOccupiedVehicle(gMe)
--there local col2 = getElementData(veh, "r.col2")
--there local col1 = getElementData(veh, "r.col1")
if not(col2) or not(col1) then return end
local x, y, z = getElementPosition(col2)
local x1, y1, z1 = getElementPosition(col1)
z1 = z1+getElementDistanceFromCentreOfMassToBaseOfModel(veh)*2
local hit, x2, y2, z2 = processLineOfSight(x, y, z, x1, y1, z1)
if not(x2) or not(y2) or not(z2) then x2, y2, z2 = x, y, z end
local sx, sy = getScreenFromWorldPosition(x2, y2, z2)
if not(sx) or not(sy) then return end
dxDrawLine(sx, sy-12.9, sx, sy+12.9, tocolor(0, 255, 0), 2)
dxDrawLine(sx-12.9, sy, sx+12.9, sy, tocolor(0, 255, 0), 2)
end
end
end
addEventHandler("onClientRender", root, crosshair)