Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rofl = getLocalPlayer ( )
- addEventHandler( "onClientRender",getRootElement(),
- function( )
- local px, py, pz, tx, ty, tz, dist
- px, py, pz = getCameraMatrix( )
- for _, v in ipairs( getElementsByType 'player' ) do
- setPlayerNametagShowing ( v, false )
- tx, ty, tz = getElementPosition( v )
- dist = math.sqrt( ( px - tx ) ^ 2 + ( py - ty ) ^ 2 + ( pz - tz ) ^ 2 )
- if dist < 30.0 then
- if isLineOfSightClear( px, py, pz, tx, ty, tz, true, false, false, true, false, false, false,localPlayer ) then
- local sx, sy, sz = getPedBonePosition( v, 5 )
- local x,y = getScreenFromWorldPosition( sx, sy + 0.01, sz + 0.3 )
- local x1,y1 = getScreenFromWorldPosition( sx, sy + 0.01, sz + 0.15)
- local x2,y2 = getScreenFromWorldPosition( sx, sy + 0.01, sz + 1)
- if x then
- dxDrawText( getPlayerName( v ), x, y, x, y, tocolor(0,255,0), 2 + ( 15 - dist ) * 0.02, "default-bold" )
- --[[waffe]] -- 2D Geld HUD
- local leben = getElementHealth ( rofl )
- local money = getPlayerMoney(rofl)
- local sWidth,sHeight = guiGetScreenSize()
- clip = getPedAmmoInClip ( rofl )
- ammo = getPedTotalAmmo ( rofl )
- waffe = getPedWeapon ( rofl )
- namewap = getWeaponNameFromID ( waffe )
- if ammo ~= 0 then
- --[[umrandwaffen]] dxDrawRectangle ( sWidth/1.32, sHeight/500.8, 350, 230, tocolor(127,127,127,200) )
- --[[ammo-clip]] dxDrawText( " :"..ammo-clip.."", sWidth/1.26, sHeight/4.4, 0, 0, tocolor(255,255,255), 2, "default-bold" )
- --[[clip]] dxDrawText( " :"..clip.."", sWidth/1.12, sHeight/4.4, 0, 0, tocolor(255,255,255), 2, "default-bold" )
- --[[clipbild]] dxDrawImage ( sWidth/1.31, sHeight/4.8, 50, 50, "Barrett 6.8.png", 0, 0, 0)
- --[[ammobild]] dxDrawImage ( sWidth/1.16, sHeight/4.8, 50, 50, "mag.png", 0, 0, 0)
- else
- dxDrawRectangle ( sWidth/1.32, sHeight/500.8, 350, 170, tocolor(127,127,127,200) )
- end
- dxDrawText ( "Geld:"..money.."€", sWidth/1.29, sHeight/6.1, sWidth/1200, sHeight/50, tocolor(0, 200, 0), 2, "default-bold" )
- --Leben
- leben = getElementHealth ( rofl )
- state = getElementData ( rofl, "status" )
- --dxDrawText( "Leben :", sWidth/3, sHeight/1.122, sWidth/1200, sHeight/50, tocolor(200,0,0), 2, "default-bold" ) --LebenRot--
- dxDrawText( ""..status.."", sWidth/1.29, sHeight/40.1, sWidth/1200, sHeight/50, tocolor(255,127,39), 2, "default-bold" ) --Status--
- if leben >= 1 then
- dxDrawImage ( sWidth/1.27, sHeight/12.9, 50, 50, "leben.png", 0, 0, 0,tocolor(255,255,255,255))
- dxDrawRectangle ( sWidth/1.19, sHeight/11.8, leben+20, 21, tocolor(1,1,1) ) ---LebenScroeBlack--
- dxDrawRectangle ( sWidth/1.18, sHeight/11.5, leben, 16, tocolor(200,0,0) ) --LebenRot-- Defferent %
- --Rng --
- local armor = getPedArmor ( rofl )
- if armor >= 1 then
- --[[ if armor == 100 then]]
- --dxDrawText( "Rüstung :", sWidth/3, sHeight/1.16, sWidth/1200, sHeight/50, tocolor(127,127,127), 2, "default-bold" )
- --RRot--
- dxDrawRectangle ( sWidth/1.19, sHeight/8.8, armor+20, 22, tocolor(1,1,1) )
- dxDrawRectangle ( sWidth/1.18, sHeight/8.5, armor, 16, tocolor(0,100,200) ) --LebenRot-- Defferent %
- dxDrawImage ( sWidth/1.05, sHeight/12.9, 50, 50, "armor.png", 0, 0, 0,tocolor(255,255,255,255))
- else
- end
- else
- end--dxDrawImage ( sWidth-970, sHeight-165, 300, 130, "background.png", 0, 0, 0,tocolor(0,0,0,50))
- end
- end
- end
- end
- end
- )
Advertisement
Add Comment
Please, Sign In to add comment