❓ how to make a simple esp? [LUA]

Posts 1–6 of 6 · Page 1 of 1
❓ how to make a simple esp? [LUA]
is there a video or source code i can look at?
Quote Originally Posted by ehabgaming View Post
is there a video or source code i can look at?
Simple ESP is just HUDPaint and draw.roundedbox with ScrW() + Height!
Very simple shit. Special for you.
Code:
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)
Quote Originally Posted by ehabgaming View Post
is there a video or source code i can look at?
https://github.com/LennyPenny/Lennys...espwh.lua#L334
or just look at the main board theres plenty of terrible esps you can look at instead

Quote Originally Posted by Mestima View Post
Very simple shit. Special for you.
ah yes so simple but youve somehow messed it all up
Code:
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)
Very new to coding and what not, i have no other idea how to say it but, how would i use this code to implement it into my game?
make a lua script and copy paste, then use a bypass and execute ingame
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Talk with us