Entity/GetClass

From Garry's Mod
Revision as of 23:07, 1 April 2015 by Exho (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 Entity:GetClass( )

Contents

Description

Returns the classname of a entity. This is often the name of the Lua file or folder containing the files for the entity

Returns

string

The entity's classname

Examples

Example

Prints the classname of the weapon that the player is holding.

print( LocalPlayer( ):GetActiveWeapon( ):GetClass( ) )

Output:

Prints the classname of the weapon that the player is holding. (ie weapon_crowbar)
Personal tools
Navigation