Guest User

Test

a guest
May 7th, 2012
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.51 KB | None | 0 0
  1. rofl = getLocalPlayer ( )
  2.  
  3. addEventHandler( "onClientRender",getRootElement(),
  4.    function( )
  5.         local px, py, pz, tx, ty, tz, dist
  6.         px, py, pz = getCameraMatrix( )
  7.         for _, v in ipairs( getElementsByType 'player' ) do
  8.             setPlayerNametagShowing ( v, false )
  9.             tx, ty, tz = getElementPosition( v )
  10.             dist = math.sqrt( ( px - tx ) ^ 2 + ( py - ty ) ^ 2 + ( pz - tz ) ^ 2 )
  11.             if dist < 30.0 then
  12.                 if isLineOfSightClear( px, py, pz, tx, ty, tz, true, false, false, true, false, false, false,localPlayer ) then
  13.                 local sx, sy, sz = getPedBonePosition( v, 5 )
  14.                 local x,y = getScreenFromWorldPosition( sx, sy + 0.01, sz + 0.3 )
  15.                 local x1,y1 = getScreenFromWorldPosition( sx, sy + 0.01, sz + 0.15)
  16.                 local x2,y2 = getScreenFromWorldPosition( sx, sy + 0.01, sz + 1)
  17.                     if x then
  18.                         dxDrawText( getPlayerName( v ), x, y, x, y, tocolor(0,255,0), 2 + ( 15 - dist ) * 0.02, "default-bold" )       
  19.                    
  20.  
  21. --[[waffe]]                             -- 2D Geld HUD
  22.                             local leben = getElementHealth ( rofl )
  23.                             local money = getPlayerMoney(rofl)  
  24.                             local sWidth,sHeight = guiGetScreenSize()  
  25.                             clip = getPedAmmoInClip ( rofl )
  26.                             ammo = getPedTotalAmmo ( rofl )
  27.                             waffe = getPedWeapon ( rofl )
  28.                             namewap = getWeaponNameFromID ( waffe )
  29.                             if ammo ~= 0 then
  30.             --[[umrandwaffen]]  dxDrawRectangle ( sWidth/1.32, sHeight/500.8, 350, 230, tocolor(127,127,127,200) )
  31.             --[[ammo-clip]]     dxDrawText( " :"..ammo-clip.."", sWidth/1.26, sHeight/4.4, 0, 0, tocolor(255,255,255), 2, "default-bold" )
  32.             --[[clip]]          dxDrawText( " :"..clip.."", sWidth/1.12, sHeight/4.4, 0, 0, tocolor(255,255,255), 2, "default-bold" )
  33.             --[[clipbild]]      dxDrawImage ( sWidth/1.31, sHeight/4.8, 50, 50, "Barrett 6.8.png", 0, 0, 0)
  34.             --[[ammobild]]      dxDrawImage ( sWidth/1.16, sHeight/4.8, 50, 50, "mag.png", 0, 0, 0)
  35.                             else
  36.                                 dxDrawRectangle ( sWidth/1.32, sHeight/500.8, 350, 170, tocolor(127,127,127,200) )
  37.                             end
  38.                            
  39.                 dxDrawText ( "Geld:"..money.."€", sWidth/1.29, sHeight/6.1, sWidth/1200, sHeight/50, tocolor(0, 200, 0), 2, "default-bold" ) 
  40. --Leben    
  41.  
  42.                 leben = getElementHealth ( rofl )
  43.                
  44.                 state = getElementData ( rofl, "status" )
  45.                
  46.                 --dxDrawText( "Leben :", sWidth/3, sHeight/1.122, sWidth/1200, sHeight/50, tocolor(200,0,0), 2, "default-bold" )    --LebenRot--
  47.                 dxDrawText( ""..status.."", sWidth/1.29, sHeight/40.1, sWidth/1200, sHeight/50, tocolor(255,127,39), 2, "default-bold" )    --Status--
  48.                 if leben >= 1 then             
  49.                     dxDrawImage ( sWidth/1.27, sHeight/12.9, 50, 50, "leben.png", 0, 0, 0,tocolor(255,255,255,255))
  50.                     dxDrawRectangle ( sWidth/1.19, sHeight/11.8, leben+20, 21, tocolor(1,1,1) ) ---LebenScroeBlack--       
  51.                     dxDrawRectangle ( sWidth/1.18, sHeight/11.5, leben, 16, tocolor(200,0,0) ) --LebenRot-- Defferent %
  52.  
  53. --R𳴵ng --
  54.                     local armor = getPedArmor ( rofl )
  55.                     if armor >= 1 then
  56.                 --[[        if armor == 100 then]]
  57.                             --dxDrawText( "Rüstung :", sWidth/3, sHeight/1.16, sWidth/1200, sHeight/50, tocolor(127,127,127), 2, "default-bold" )
  58.                             --R𳳩Rot--
  59.                             dxDrawRectangle ( sWidth/1.19, sHeight/8.8, armor+20, 22, tocolor(1,1,1) )
  60.                             dxDrawRectangle ( sWidth/1.18, sHeight/8.5, armor, 16, tocolor(0,100,200) ) --LebenRot-- Defferent %
  61.                             dxDrawImage ( sWidth/1.05, sHeight/12.9, 50, 50, "armor.png", 0, 0, 0,tocolor(255,255,255,255))
  62.                     else
  63.                         end
  64.  
  65.                 else
  66.                     end--dxDrawImage ( sWidth-970, sHeight-165, 300, 130, "background.png", 0, 0, 0,tocolor(0,0,0,50))
  67.  
  68.  
  69.                                        
  70.                 end
  71.             end
  72.         end
  73.     end
  74. end
  75. )
Advertisement
Add Comment
Please, Sign In to add comment