Garry's Mod Wiki

Garry's Mod Wiki

  number Weapon:GetActivity()

Description

Returns the sequence enumeration number that the weapon is playing.

This can return inconsistent results between the server and client.

Issue Tracker: 2543

Returns

1 number
Current activity, see ACT enum. Returns 0 if the weapon doesn't have active sequence.

Example

This will return the ACT_ENUM that is currently active for the weapon.

local wep = Entity(1):GetActiveWeapon() if ( IsValid( wep ) ) then // Makes sure that wep exists print( wep:GetActivity() ) // Prints the sequence number 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 twice a day. Edits and history are not available.

Last Parsed: Loading...