Old keypad stealer [LUA]

Posts 16–28 of 28 · Page 2 of 2
Nope it doesn't work for me... Btw,don't mind the name just named it randomly ttt xD

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
and this is how the Lua looks. tell me if i'm mistaking something
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 )
I'm still not good with coding.
But that's what I recall doing.

This is what garry said.
"Removed ValidEntity( ent ) (replace with IsValid( ent ))"
Bump.
Still love this and still works so ya =3

Please dont rage that I bumped this but I think this needs more attention cuz It works and is awesome.
Btw maybe this needs to be moved to GMod?
@Gray @Lonesome Cowboy
Quote Originally Posted by xCyberxx View Post
Bump.
Still love this and still works so ya =3

Please dont rage that I bumped this but I think this needs more attention cuz It works and is awesome.
Btw maybe this needs to be moved to GMod?
@Antipathy @Lonesome Cowboy
If you do that again, you are banned. I pardon you this time
Quote Originally Posted by Lonesome Cowboy View Post


If you do that again, you are banned. I pardon you this time
Wut?
I get banned for bumping?
They told me i get banned if i repost stuff so i have to bump threads!
And banned for how long? =(

Well thanks anyway for pardoning me this time =)
I think that he was joking though, Lonesome is a cool guy
Quote Originally Posted by Gray View Post
I think that he was joking though, Lonesome is a cool guy
Or I ban you all.
Don't worry, I only get you banned for bumping if it isn't reasonable.
Quote Originally Posted by Lonesome Cowboy View Post


Or I ban you all.
Don't worry, I only get you banned for bumping if it isn't reasonable.
Come at me brah, I'll give you milk and cookies brah.
ValidEntity has to be defined. As of the script right now it is saying "I dont know what the ValidEntity is!" nil -= unknown
Quote Originally Posted by epicosity View Post
ValidEntity has to be defined. As of the script right now it is saying "I dont know what the ValidEntity is!" nil -= unknown
It still works for me =/
Quote Originally Posted by epicosity View Post
ValidEntity has to be defined. As of the script right now it is saying "I dont know what the ValidEntity is!" nil -= unknown
Did you not read links posted? They were posted for a reason. ValidEntity is now IsValid.
--snippy snip--
plz plz plz some1 fix 4 me.

Then refuses to release.
Posts 16–28 of 28 · Page 2 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us