Garry's Mod Wiki

Garry's Mod Wiki

  number ents.GetCount( boolean IncludeKillMe = false )

Description

Gives you the amount of currently existing entities.

Similar to #ents.GetAll() but with better performance since the entity table doesn't have to be generated.
If ents.GetAll is already being called for iteration, than using the # operator on the table will be faster than calling this function since it is JITted.

Arguments

1 boolean IncludeKillMe = false
Include entities with the FL_KILLME flag. This will skip an internal loop, and the function will be more efficient as a byproduct.

Returns

1 number
Number of entities

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...