QuestionSolvedMy coding skillz

Posts 17 of 7 · Page 1 of 1
My coding skillz
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
Quote Originally Posted by l1m3w1r3 View Post
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
Code:
if input.IsKeyDown(KEY_B) == true then
This should be in the HUDPaint scope not outside it!
Can you edit it for me?
Quote Originally Posted by l1m3w1r3 View Post
Can you edit it for me?
Yes

Code:
hook.Add( "HUDPaint", "biggestwallhackru", function()
	
	if input.IsKeyDown(KEY_B) == true then // In the PAINThud scope so it continues to run and not stop
	
		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
	
end )
Here you go!
You got a better code?

- - - Updated - - -

Quote Originally Posted by suchisgood View Post
Yes

Code:
hook.Add( "HUDPaint", "biggestwallhackru", function()
	
	if input.IsKeyDown(KEY_B) == true then // In the PAINThud scope so it continues to run and not stop
	
		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
	
end )
Here you go!
Thank you m8
Quote Originally Posted by l1m3w1r3 View Post
You got a better code?

- - - Updated - - -



Thank you m8
welcome, enjoy. Code works fine just ignore his autism!
Posts 17 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?