Garry's Mod Wiki

NPC:PickupWeapon

boolean NPC:PickupWeapon( Weapon wep )

Just Added

This was just added in the latest version (2020.06.24). It might only be available on the Dev Branch right now.

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.

Page Links


Special Pages


Wikis

?

Render Time: 37ms

DB GetPage 3
Generate Html 3
SaveChanges (1) 16
Render Body 0
Render Sidebar 12