Garry's Mod Wiki

Player:SetActiveWeapon

Player:SetActiveWeapon( Weapon weapon )

Description

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

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

Arguments

1 Weapon weapon
The weapon to equip.

Page Links


Special Pages


Wikis

?

Render Time: 36ms

DB GetPage 4
Generate Html 10
SaveChanges (1) 8
Render Body 0
Render Sidebar 12