Garry's Mod Wiki

Player:GetActiveWeapon

Description

Returns the player's active weapon.

Returns

1 Weapon
The weapon the player is currently has equipped.

Example

Prints the player's active weapon's class name.

print(Entity( 1 ):GetActiveWeapon():GetClass())
Output: The active weapon's class. For example, if you are holding the tool gun then this will be "gmod_tool".

Page Links


Special Pages


Wikis

?

Render Time: 29ms

Session 0
DB GetPage 5
Generate Html 2
SaveChanges 8
Render Body 0
Render Sidebar 12