Garry's Mod Wiki

Revision Difference

Player:GetCount#547216

<function name="GetCount" parent="Player" type="classfunc"> <description>Gets total count of entities of same class.</description>⤶ <description>Gets total count of entities of same type.⤶ Default types:⤶ ```⤶ balloons⤶ buttons⤶ cameras⤶ dynamite⤶ emitters⤶ hoverballs⤶ lamps⤶ lights⤶ props⤶ ragdolls⤶ thrusters⤶ wheels⤶ ```</description>⤶ <realm>Shared</realm> <args> <arg name="class" type="string">Entity class to get count of.</arg> <arg name="type" type="string">Type to get entity count of.</arg> <arg name="minus" type="number" default="0">If specified, it will reduce the counter by this value. Works only serverside.</arg> </args> <rets> <ret name="count" type="number">The returned count.</ret> </rets> </function></function>⤶ ⤶ <example>⤶ <code>⤶ print( Entity(1):GetCount("props") )⤶ </code>⤶ </example>