local lply = LocalPlayer()
hook.Add("HUDPaint", "ESPShit", function()
for __,ply in pairs(player.GetAll()) do
if !ply:Alive() then continue end
if ply:GetPos():Distance(lply:GetPos()) > 3000 then return end
local data = "[" .. ply:Nick() .. "][" .. ply:EntIndex() .. "]" .. "[" .. ply:GetNWString("usergroup") .. "]"
local pos = (ply:EyePos() + Vector(0,0,20)):ToScreen()
draw.SimpleTextOutlined(data, "Trebuchet18", pos.x, pos.y, Color(255,255,0), 0,0,1, Color(0,0,0))
end
end)
local lp = LocalPlayer ()
local dist = 3000 * 3000
local col = Color (0xFF, 0xB6, 0xC1) -- make me outside and use a pretty colour (this is lightpink :D)
hook.Add ('HUDPaint', ('%s e_spshit'):format (tostring {}), function ()
local lppos = lp:GetPos () -- store localplayer pos as you dont need to get it everytime in a loop
local plys = player.GetAll ()
for a = 1, player.GetCount () do -- stop using pairs the table is sequential
local ply = plys [a]
if ply == lp then continue end -- no self
if not ply:Alive () then continue end -- no garry operators please
if ply:GetPos ():DistToSqr (lppos) > dist then continue end -- use disttosqr and dont return
local pos = (ply:EyePos () + Vector (0, 0, 20)):ToScreen ()
-- draw is just a buffer for surface, we arent stupid (hopefully) so we just use surface like normal human beings
surface.SetFont 'Trebuchet18'
surface.SetTextColor (col )
surface.SetTextPos (pos.x, pos.y)
surface.DrawText (('[%s][%s][%s]'):format (ply:Nick (), ply:EntIndex (), ply:GetUserGroup ())) -- format is much cleaner and not as retarded as '..', use a cache and table.concat if u want "fast"
end
end)