Add_NPC_Class

From Garry's Mod
Revision as of 21:57, 21 February 2019 by Gasp (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 Add_NPC_Class( )

Contents

Description

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

Arguments

string name

The name of the new enum/global variable.

Examples

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_ Enums)
Personal tools
Navigation