Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addEventHandler("onClientHUDRender", getRootElement(), function()
- for k,v in ipairs (getElementsByType("player")) do
- if v ~= localPlayer then
- local lx,ly,lz = getPedBonePosition(localPlayer,8)
- local x,y,z = getPedBonePosition(v,8)
- if getDistanceBetweenPoints3D(lx,ly,lz,x,y,z) < 30 then
- if isLineOfSightClear(x,y,z+1,lx, ly, lz+1) == true then
- local x1,y1 = getScreenFromWorldPosition(x,y,z+0.5)
- local x2,y2 = getScreenFromWorldPosition(x,y,z+0.4)
- local x3,y3 = getScreenFromWorldPosition(x,y,z+0.6)
- if x1 and y1 and x2 and y2 and x3 and y3 then
- dxDrawText (getPlayerName(v),x1,y1,x1,y1,tocolor(255,255,255,255),2,"default-bold","center")
- dxDrawRectangle(x2-100,y2,200,25, tocolor(0,0,0,150))
- dxDrawRectangle(x2-98,y2+2,196/100*getElementHealth(v),21, tocolor(200,20,20,150))
- dxDrawText ("Owner/Leader",x3,y3,x3,y3,tocolor(255,60,0,255),2,"default-bold","center")
- end
- end
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement