Initial commit
This commit is contained in:
20
lua/includes/extensions/ents.lua
Normal file
20
lua/includes/extensions/ents.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
function ents.FindByClassAndParent( classname, entity )
|
||||
|
||||
if ( !IsValid( entity ) ) then return end
|
||||
|
||||
local out = {}
|
||||
|
||||
for k, v in ipairs( ents.FindByClass( classname ) ) do
|
||||
|
||||
if ( v:GetParent() == entity ) then
|
||||
table.insert( out, v )
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if ( out[1] == nil ) then return end
|
||||
|
||||
return out
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user