Garry's Mod Wiki

Garry's Mod Wiki

  number Player:GetCount( string type, number minus = 0 )

Description

This function is only available in Sandbox and its derivatives.

Gets the total amount of entities of an entity type added by Player:AddCount.

Default types:

balloons buttons cameras dynamite effects emitters hoverballs lamps lights npcs props ragdolls sents thrusters vehicles wheels

Arguments

1 string type
Type to get entity count of.
2 number minus = 0
If specified, it will reduce the counter by this value. Works only serverside.

Returns

1 number count
The returned count.

Example

print( Entity(1):GetCount("props") )

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...