Noneatme

Untitled

Feb 3rd, 2012
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.05 KB | None | 0 0
  1. function check_hud_func()
  2.         local Gun = getPedWeapon ( gMe )
  3.         if not(Gun) then return end
  4.         if not(fireWeapons[getSlotFromWeapon(Gun)]) then return end
  5.         local w, h = guiGetScreenSize ()
  6.         local x, y, z = getPedTargetEnd ( gMe )
  7.         if not(x) or not(y) or not(z) then return end
  8.         local sx, sy = getScreenFromWorldPosition(x, y, z+0.55)
  9.         local sx2, sy2 = getScreenFromWorldPosition(x, y, z-0.8)
  10.         local sx3, sy3 = getScreenFromWorldPosition(x, y, z)
  11.         if not(sx) or not(sy) then return end  
  12.         dxDrawLine(sx, sy-8.9, sx, sy, tocolor(0, 0, 255), 2)
  13.         dxDrawLine(sx2, sy2-8.9, sx2, sy2, tocolor(0, 0, 255), 2)
  14.         dxDrawLine(sx3-22.9, sy3, sx3-14.9, sy3, tocolor(0, 0, 255), 2)
  15.         dxDrawLine(sx3+22.9, sy3, sx3+14.9, sy3, tocolor(0, 0, 255), 2)
  16.        
  17.         dxDrawLine(sx, sy-8, sx, sy, tocolor(0, 255, 0), 2)
  18.         dxDrawLine(sx2, sy2-8, sx2, sy2, tocolor(0, 255, 0), 2)
  19.         dxDrawLine(sx3-22, sy3, sx3-14, sy3, tocolor(0, 255, 0), 2)
  20.         dxDrawLine(sx3+22, sy3, sx3+14, sy3, tocolor(0, 255, 0), 2)
  21.    
  22. end
  23.  
  24. addEventHandler("onClientRender", getRootElement(), check_hud_func)
Advertisement
Add Comment
Please, Sign In to add comment