Garry's Mod Wiki

Garry's Mod Wiki

  Add_NPC_Class( string name )

Description

Defines a global entity class variable with an automatic value. In order to prevent collisions with other CLASS enum. You should prefix your variable with CLASS_ for consistency.

Arguments

1 string name
The name of the new enum/global variable.

Example

Creates a global variable named CLASS_TESTER and prints its value.

Add_NPC_Class( "CLASS_TESTER" ) print( CLASS_TESTER )
Output: 36 (one greater than the current highest value of the CLASS enum)

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...