forked from willox/gmod-keypad
Net messages correctly ignore entities that are not keypads
This commit is contained in:
parent
d459635c9b
commit
df9647cc50
@ -11,7 +11,7 @@ util.AddNetworkString("Keypad")
|
||||
net.Receive("Keypad", function(_, ply)
|
||||
local ent = net.ReadEntity()
|
||||
|
||||
if not IsValid(ply) or not IsValid(ent) or not ent:GetClass():lower() == "keypad" then
|
||||
if not IsValid(ply) or not IsValid(ent) or ent:GetClass():lower() ~= "keypad" then
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -11,7 +11,7 @@ util.AddNetworkString("Keypad_Wire")
|
||||
net.Receive("Keypad_Wire", function(_, ply)
|
||||
local ent = net.ReadEntity()
|
||||
|
||||
if not IsValid(ply) or not IsValid(ent) or not ent:GetClass():lower() == "keypad_wire" then
|
||||
if not IsValid(ply) or not IsValid(ent) or ent:GetClass():lower() ~= "keypad_wire" then
|
||||
return
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user