Garry's Mod Wiki

NPC:GetWeapon

  Weapon NPC:GetWeapon( string class )

Description

Returns a specific weapon the NPC owns.

Arguments

1 string class
A classname of the weapon to try to get.

Returns

1 Weapon wep
The weapon for the specified class, or NULL of the NPC doesn't have given weapon.