Garry's Mod Wiki

Garry's Mod Wiki

  table Player:GetWeapons()

Description

Returns a table of the player's weapons.

This function returns a sequential table. Prefer to loop it with ipairs instead of the pairs function.

Returns

1 table
All the weapons the player currently has.

Example

Prints how many weapons the player has.

print( #Entity( 1 ):GetWeapons() )
Output: The number of weapons the player has (e.g. 5).

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