Player.DropNamedWeapon
From GMod Wiki
Revision as of 21:54, 17 September 2009 by Unrealomega (Talk | contribs)
Function | |
Syntax | Player:DropNamedWeapon( String weapon_class ) |
Description: | |
Forces a player to drop a specific weapon. | |
Returns: | nil |
In Object: | Player |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Player.DropNamedWeapon]Player.DropNamedWeapon [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Drop the phys gun |
---|---|
Used on | |
Code | function DropPhysGun(ply) ply:DropNamedWeapon("weapon_physgun") end concommand.Add("dropphys", DropPhysGun) |
Output | N/A |
Additional notes
- This uses a dropped weapon base class for hl2, walking over this will pick it up.
- When used on the crowbar, the crowbar does not get dropped, it simply disappears from your inventory.