The font stays the exact same size at whatever you set it at.
So I was wandering how to make my esp not get bigger the farther you get from it.
This is my code so far
Code:local function nameESP() for k, v in pairs( player.GetAll() ) do local pos = ( v:GetShootPos() + Vector( 0, 0, 50 ) ):ToScreen() draw.DrawText( v:Nick(), "Default", pos.x, pos.y, Color( 255, 255, 255, 255 ), 1 ) draw.DrawText( v:Health(), "Default", pos.x, pos.y + 60, Color( 255, 255, 255, 255 ), 1 ) end end hook.Add( "HUDPaint", "nameesp", nameESP )
The font stays the exact same size at whatever you set it at.
When I back up the position changes
Well, no shit...
Use GetPos() instead of GetShootPos(). You draw ESP in a very odd way...
Try this:
I swayed away from using a static color, because that's disgusting. Chances are, you're going to playing on a DarkRP server like everyone else, so all white text would be confusing.Code:hook.Add("HUDPaint", "nameESP", function() for k,v in pairs(player.GetAll()) do local pos = v:GetPos():ToScreen(); draw.SimpleText( v:Nick(), "Default", pos.x, pos.y, team.GetColor(v:Team()), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER ); draw.SimpleText( v:Health(), "Default", pos.x, pos.y + 60, team.GetColor(v:Team()), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER ); end end)
Last edited by Chief Gooby; 11-08-2016 at 01:01 AM.
make sure you compensate for the fact that the text will still draw on players even after dieing
everything is spaced out for my personal preference
Code:local function nameESP() for k, v in pairs( player.GetAll() ) do local pos = ( v:GetShootPos() + Vector( 0, 0, 50 ) ):ToScreen() if v:Alive() and v:Health() > 0 then draw.DrawText( v:Nick(), "Default", pos.x, pos.y, Color( 255, 255, 255, 255 ), 1 ) draw.DrawText( v:Health(), "Default", pos.x, pos.y + 60, Color( 255, 255, 255, 255 ), 1 ) end end end hook.Add( "HUDPaint", "nameesp", nameESP )
Last edited by bee_tee_gee; 11-08-2016 at 10:56 AM.
Thanks for the help lol, I didn't expect people to actually help
Has your question been solved? @meme420
yea u can close this shit