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/
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
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 )
[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

