Garry's Mod Wiki

Garry's Mod Wiki

  number WEAPON:GetCapabilities()

Description

This hook is for NPCs, you return what they should try to do with it.

Calling NPC:CapabilitiesGet in this hook on the same entity can cause infinite loops since that function adds the result of WEAPON:GetCapabilities on top of the return value.

Returns

1 number
A number defining what NPC should do with the weapon. Use the CAP enum.

Example

As defined in weapon_base

function SWEP:GetCapabilities() return bit.bor( CAP_WEAPON_RANGE_ATTACK1, CAP_INNATE_RANGE_ATTACK1 ) end

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...