Garry's Mod Wiki

ents.GetCount

ents.GetCount

  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

Special Pages


Wikis

?

Render Time: 63ms

DB GetPage 44
Generate Html 3
SaveChanges (1) 7
Render Body 0
Render Sidebar 6