é mais ou menos assim..
local drawDistance = 70
function onClientRender()
if isElement(player) and isElementStreamedIn(player) then
do
local vx, vy, vz = getPedBonePosition( v, 5 )
local dist = getDistanceBetweenPoints3D(cx, cy, cz, vx, vy, vz)
if dist < drawDistance and isLineOfSightClear(cx, cy, cz, vx, vy, vz, true, false, false) then
local x, y = getScreenFromWorldPosition(vx, vy, vz + 0.3)
if x and y then
dxDrawImage(x - 1 - w / 4, y - 1 - h - 20, w, h, "img/image.png")
end
end
end
end
end
addEventHandler("onClientRender", root, onClientRender)