adil nawaz Posted October 19, 2015 Share Posted October 19, 2015 addEventHandler( "onClientRender",root, function( ) local px, py, pz, tx, ty, tz, dist px, py, pz = getCameraMatrix( ) for _, v in ipairs( getElementsByType 'player' ) do tx, ty, tz = getElementPosition( v ) dist = math.sqrt( ( px - tx ) ^ 0 + ( py - ty ) ^ 0 + ( pz - tz ) ^ 0 ) 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, 6 ) local x,y = getScreenFromWorldPosition( sx, sy, sz + 0.3 ) local playerR, playerG, playerB = getPlayerNametagColor ( localPlayer ) local Level = getElementData(localPlayer,"Level") or 0 if x then dxDrawText( string.gsub ( getPlayerName ( v ), "#%x%x%x%x%x%x", "" ).."", x, y, x, y, tocolor(playerR, playerG, playerB), 0.80 + ( 15 - dist ) * 0.02, "default-bold" ) end end end end end ) ________________________ any body help me in this to add Icon to the nametags? Not it chatbox. On player head. Link to comment
Noki Posted October 19, 2015 Share Posted October 19, 2015 You will have to use dxDrawImage. Link to comment
adil nawaz Posted October 19, 2015 Author Share Posted October 19, 2015 Thanx bro. I will never forget your help Link to comment
Al3grab Posted October 19, 2015 Share Posted October 19, 2015 Thanx bro. I will never forget your help Link to comment
MisterQuestions Posted October 23, 2015 Share Posted October 23, 2015 Thanx bro. I will never forget your help We are here to help, not to do you work. If we do it by yourself you will not learn. Link to comment
adil nawaz Posted November 3, 2015 Author Share Posted November 3, 2015 Ok good. Can you help in that which command I use for get previous skin/character. Like on local player wasted respawn him with previous skin he was? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now