Player/GetWeapons

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(No need for "Read only", it's pretty obvious on it own.)
Line 2: Line 2:
 
|Name=GetWeapons
 
|Name=GetWeapons
 
|Parent=Player
 
|Parent=Player
|Description=Returns a table of the player's weapons. Read-only.
+
|Description=Returns a table of the player's weapons.
 
|Realm=Shared
 
|Realm=Shared
 
|IsClass=Yes
 
|IsClass=Yes

Revision as of 07:47, 30 May 2014

 Player:GetWeapons( )

Contents

Description

Returns a table of the player's weapons.

Returns

table

All the weapons the player currently has.

Examples

Example

Prints how many weapons the player has.

print(table.Count(Player(1):GetWeapons()))

Output:

The number of weapons the player has (e.g. 5).
Personal tools
Navigation