I am trying to create a Wanteds system but not to getting someone can help me please!
Thank you: D
local drawDistance = 70
function onClientRender()
if isElement(player) and isElementStreamedIn(player) then
do
local vx, vy, vz = getPedBonePosition(player, -- s8) -->
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
local wanteds = getPlayerWantedLevel(localPlayer)
if wanteds > 0 then
dxDrawImage(x - 1 - w / 4, y - 1 - h - 20, w, h, "img/wanteds.png")
end
end
end
end
end
end
addEventHandler("onClientRender", root, onClientRender)