Old keypad stealer [LUA]

Posts 115 of 28 · Page 1 of 2
Old keypad stealer [LUA]
I tested this just recently and it flooded my console so I had to abort the test.
Don't feel like getting a server ban.

Anyone that know how or could tell me how to update this?
Is it even possible to update?

If you don't know what it is

Description: Steals keypad passwords, once they’ve been entered successfully once. Look at a keypad close range to see the password, if it has been retrieved.
Install into: lua/autorun/client/

Code:
local function Think()
	for _, e in pairs( ents.GetAll() ) do
		if ( ValidEntity( e ) ) then
			local class = e:GetClass()
			if ( class == "sent_keypad" || class == "sent_keypad_wire" ) then
				if ( e:GetNWBool( "keypad_access" ) && e:GetNWBool( "keypad_showaccess" ) ) then
					e.Password = e:GetNWInt( "keypad_num" )
				end
			end
		end
	end
end
hook.Add( "Think", "KeyPadH4X.Think", Think )

local function HUDPaint()
	local ply = LocalPlayer()
	if ( !ValidEntity( ply ) ) then return end
	
	local trace = util.QuickTrace( ply:GetShootPos(), ply:GetAimVector() * 100, ply )
	if ( ValidEntity( trace.Entity ) && trace.Entity.Password ) then
		local pos = ( trace.Entity:GetPos() + Vector( 0, 0, 6 ) ):ToScreen()
		local text = "Pass:" .. trace.Entity.Password,
		
		surface.SetFont( "Default" )
		local w = surface.GetTextSize( text ) + 16
		
		draw.WordBox( 8, ( ScrW() / 2 ) - ( w / 2 ), ( ScrH() / 2 ) + 40, text, "Default", Color(50,50,75,200), Color(255,255,255,255) )
	end
end
hook.Add( "HUDPaint", "KeyPadH4X.HUDPaint", HUDPaint )
This is the error I got in thousands.

[ERROR] lua/keypad.lua:3: attempt to call global 'ValidEntity' (a nil value)
1. fn - lua/keypad.lua:3
2. unknown - addons/ulib/lua/ulib/shared/hook.lua:168



I could try to update it for you, I'll post it when I'm done.
Quote Originally Posted by iMythik View Post
I could try to update it for you, I'll post it when I'm done.
Thanks, if you do manage, I will have a lot of fun with it.
Would love to see this completed. Good Luck
Since nobody is really "trying" to help.
I decided to go berserk on it on my own, so far I've fixed it up and got no errors.
But I don't have wiremod installed so I'll have to do that first, after that I'll try it.
Hey Inferior, Did you ever get this to work? If so do you mind posting the code and instructions on how to use it?
Quote Originally Posted by DayZBypasser View Post
Hey Inferior, Did you ever get this to work? If so do you mind posting the code and instructions on how to use it?
I'm not sure if I ever got it to work, I think it might be patched.
I solved the errors anyway, might post the update later.
Quote Originally Posted by Gray View Post


I'm not sure if I ever got it to work, I think it might be patched.
I solved the errors anyway, might post the update later.
So would you mind sending me the keypad stealer and the console commands?
Quote Originally Posted by DayZBypasser View Post
So would you mind sending me the keypad stealer and the console commands?
Not feeling like it right now, maybe later on.
Quote Originally Posted by Gray View Post


Not feeling like it right now, maybe later on.
Could you send it right now?
Quote Originally Posted by Zastava_101 View Post
Could you send it right now?
It's not that hard to spruce it up yourself.
The documentation you need is provided by kila up there.
Quote Originally Posted by Gray View Post


It's not that hard to spruce it up yourself.
The documentation you need is provided by kila up there.
I don't know **** about coding..yet...Soo i don't think i can do it :/
Quote Originally Posted by Zastava_101 View Post
I don't know **** about coding..yet...Soo i don't think i can do it :/
I don't know enough so all I did was replace ValidEntity with IsValid.
Posts 115 of 28 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?