Garry's Mod Wiki

Revision Difference

Player:SetActiveWeapon#512503

<function name="SetActiveWeapon" parent="Player" type="classfunc">⤶ <description>⤶ Sets the player's active weapon. You should use <page>CUserCmd:SelectWeapon</page> or <page>Player:SelectWeapon</page>, instead in most cases.⤶ ⤶ <note>This function will not trigger the weapon switch event or associated equip animations. You can achieve this using <page>Player:SelectWeapon</page> with <page>Entity:GetClass</page>.</note>⤶ ⤶ <note>This will not call <page>GM:PlayerSwitchWeapon</page>.</note>⤶ </description>⤶ <realm>Server</realm>⤶ <args>⤶ <arg name="weapon" type="Weapon">The weapon to equip.</arg>⤶ </args>⤶ </function>⤶ ⤶