Garry's Mod Wiki

NPC:PickupWeapon

  boolean NPC:PickupWeapon( Weapon wep )

Description

Forces the NPC to pickup an existing weapon entity. The NPC will not pick up the weapon if they already own a weapon of given type, or if the NPC could not normally have this weapon in their inventory.

Arguments

1 Weapon wep
The weapon to try to pick up.

Returns

1 boolean result
Whether the NPC succeeded in picking up the weapon or not.