Garry's Mod Wiki

NPC:GetWeapon

Weapon NPC:GetWeapon( string class )

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

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.

Page Links


Special Pages


Wikis

?

Render Time: 45ms

DB GetPage 4
Generate Html 3
SaveChanges (1) 18
Render Body 0
Render Sidebar 17