Garry's Mod Wiki

Revision Difference

GM:PlayerDroppedWeapon#511098

<function name="PlayerDroppedWeapon" parent="GM" type="hook">⤶ <ishook>yes</ishook>⤶ <description>⤶ Called when a weapon is dropped by a player via <page>Player:DropWeapon</page>.⤶ ⤶ See also <page>GM:WeaponEquip</page> for a hook when a player picks up a weapon.⤶ ⤶ The weapon's <page>Entity:GetOwner</page> will be NULL at the time this hook is called.⤶ ⤶ ⤶ <page>WEAPON:OnDrop</page> will be called before this hook is.⤶ </description>⤶ <realm>Server</realm>⤶ <predicted>No</predicted>⤶ <args>⤶ <arg name="owner" type="Player">The player who owned this weapon before it was dropped</arg>⤶ <arg name="wep" type="Weapon">The weapon that was dropped</arg>⤶ </args>⤶ </function>⤶ ⤶