Seems it doesn't like wildcards in the beginning of the string, just search for them one class at a time and merge the returned tables.
[lua]
function ents.GetDoors()
local doors = {}
for k,v in pairs(ents.GetAll()) do
if( string.match(string.lower(v:GetClass()), "door") ) then
table.insert(doors, v)
end
end
return doors
end
AllDoors = ents.GetDoors();
[/lua]
Untested
Sorry, you need to Log In to post a reply to this thread.