Player.GetCount

From GMod Wiki

Jump to: navigation, search
Gamemode Function: Player.GetCount
Player.GetCount is a function that is defined in the Sandbox Gamemode and its derivatives.
Function
Syntax Player:GetCount( String Count-type )
Description:
Sandbox Function, returns how much of a specific entity that a player spawned.
Returns: Integer
In Object: Player
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.GetCount]Player.GetCount [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionThis will return how many Hoverballs player 1 has spawned.
Used onNewerServer.png
Code
Msg( tostring( player.GetByID(1):GetCount( "hoverballs" ) ) )
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox