Nope it doesn't work for me... Btw,don't mind the name just named it randomly ttt xD
and this is how the Lua looks. tell me if i'm mistaking something
Code:
[ERROR] lua/ttt.lua:3: attempt to call global 'isValid' (a nil value) 1. fn - lua/ttt.lua:3 2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183 [ERROR] lua/ttt.lua:17: attempt to call global 'isValid' (a nil value) 1. fn - lua/ttt.lua:17 2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183 [ERROR] lua/ttt.lua:3: attempt to call global 'isValid' (a nil value) 1. fn - lua/ttt.lua:3 2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183
Code:
local function Think() for _, e in pairs( ents.GetAll() ) do if ( isValid( 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 ( !isValid( ply ) ) then return end local trace = util.QuickTrace( ply:GetShootPos(), ply:GetAimVector() * 100, ply ) if ( isValid( 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 )



Or I ban you all.