Garry's Mod Wiki

ents.FindByClassAndParent

  table ents.FindByClassAndParent( string class, Entity parent )

Description

Finds all entities that are of given class and are children of given entity. This works internally by iterating over ents.GetAll.

Arguments

1 string class
The class of entities to search for
2 Entity parent
Parent of entities that are being searched for

Returns

1 table
A table of found entities or nil if none are found