Player/SetActiveWeapon

From Garry's Mod
Jump to: navigation, search
 Player:SetActiveWeapon( )

Description

Sets the player's active weapon. You should use CUserCmd:SelectWeapon or Player:SelectWeapon, instead in most cases.

NOTE

This function will not trigger the weapon switch event or associated equip animations. You can achieve this using Player:SelectWeapon with Entity:GetClass.

NOTE

This will not call GM:PlayerSwitchWeapon.

Arguments

Weapon weapon

The weapon to equip.
Personal tools
Navigation