Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addEventHandler("onClientRender",getRootElement(),
- function()
- for index, player in pairs(getElementsByType("player", getRootElement(), true)) do
- local target = getPedTarget(player)
- if (target) and getPedWeapon(player) == 34 then
- local px,py,pz, tx,ty,tz, wx,wy,wz, theTarget, theDistance
- if getElementType(target) == "player" then
- tx,ty,tz = getPedTargetCollision(player)
- if not(tx) then
- tx, ty, tz = getPedTargetEnd(player);
- end
- wx,wy,wz = getPedWeaponMuzzlePosition(localPlayer)
- end
- dxDrawLine3D(wx,wy,wz,tx,ty,tz,tocolor(255,0,0))
- if(player == localPlayer) then
- dxDrawText("Target: "..theTarget.."", 1497, 915, 1910, 957, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false)
- dxDrawText("Distance: "..math.round(theDistance).."m", 1497, 957, 1907, 1005, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement