I've never done something in lua before so I need your help
I've tried to do an esp what you can toggle by pressing B
I found this code by a user called "Aethi"
Code:
hook.Add( "HUDPaint", "biggestwallhackru", function()
for k,v in pairs ( player.GetAll() ) do
local Position = ( v:GetPos() + Vector( 0,0,80 ) ):ToScreen()
local Name = ""
if v == LocalPlayer() then Name = "" else Name = v:Name() end
draw.DrawText( Name, "Default", Position.x, Position.y, Color( 255, 255, 255, 255 ), 1 )
end
end )
Then I tried this but it's not working
Code:
if input.IsKeyDown(KEY_B) == true then
hook.Add( "HUDPaint", "biggestwallhackru", function()
for k,v in pairs ( player.GetAll() ) do
local Position = ( v:GetPos() + Vector( 0,0,80 ) ):ToScreen()
local Name = ""
if v == LocalPlayer() then Name = "" else Name = v:Name() end
draw.DrawText( Name, "Default", Position.x, Position.y, Color( 255, 255, 255, 255 ), 1 )
end
end )
I'm not trolling so pls help my with that