Garry's Mod Wiki

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

Page Links


Special Pages


Wikis

?

Render Time: 30ms

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