Garry's Mod Wiki

Add_NPC_Class

Add_NPC_Class( string name )

Description

Defines a global entity class variable with an automatic value in order to prevent collisions with other Enums/CLASS. 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 Enums/CLASS)

Page Links


Special Pages


Wikis

?

Render Time: 31ms

Session 0
DB GetPage 3
Generate Html 5
Render Body 0
Render Sidebar 13