From 122d8a9c3c86f4980800d332c873c29861589dae Mon Sep 17 00:00:00 2001 From: slaVACo <34865209+slaVACo@users.noreply.github.com> Date: Tue, 8 Jan 2019 00:36:15 +0500 Subject: [PATCH 1/2] Update keypad_willox.lua fixed spam error --- lua/weapons/gmod_tool/stools/keypad_willox.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/weapons/gmod_tool/stools/keypad_willox.lua b/lua/weapons/gmod_tool/stools/keypad_willox.lua index de5a524..a098c56 100644 --- a/lua/weapons/gmod_tool/stools/keypad_willox.lua +++ b/lua/weapons/gmod_tool/stools/keypad_willox.lua @@ -83,7 +83,7 @@ function TOOL:RightClick(tr) return false end - if trace_ent:GetKeypadOwner() == ply then + if trace_ent:GetClass() == 'keypad' and trace_ent:GetKeypadOwner() == ply then self:SetupKeypad(trace_ent, password) return true @@ -202,4 +202,4 @@ if CLIENT then CPanel:Help("You can enter your password with your numpad when numlock is enabled!") end -end \ No newline at end of file +end From deabd3e6ae70a2aadc3f7184da54f2502736a484 Mon Sep 17 00:00:00 2001 From: slaVACo <34865209+slaVACo@users.noreply.github.com> Date: Tue, 8 Jan 2019 01:02:28 +0500 Subject: [PATCH 2/2] Update keypad_willox.lua --- lua/weapons/gmod_tool/stools/keypad_willox.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/weapons/gmod_tool/stools/keypad_willox.lua b/lua/weapons/gmod_tool/stools/keypad_willox.lua index a098c56..6dcd25a 100644 --- a/lua/weapons/gmod_tool/stools/keypad_willox.lua +++ b/lua/weapons/gmod_tool/stools/keypad_willox.lua @@ -68,7 +68,7 @@ function TOOL:SetupKeypad(ent, pass) end function TOOL:RightClick(tr) - if not IsValid(tr.Entity) or not tr.Entity:GetClass():lower() == "keypad" then return false end + if not IsValid(tr.Entity) or tr.Entity:GetClass():lower() != "keypad" then return false end if CLIENT then return true end @@ -82,8 +82,7 @@ function TOOL:RightClick(tr) ply:PrintMessage(3, "Invalid password!") return false end - - if trace_ent:GetClass() == 'keypad' and trace_ent:GetKeypadOwner() == ply then + if trace_ent:GetKeypadOwner() == ply then self:SetupKeypad(trace_ent, password) return true