Garry's Mod Wiki

Entity:GetClass

Entity:GetClass

  string Entity:GetClass()

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

1 string
The entity's classname

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)

Special Pages


Wikis

?

Render Time: 63ms

DB GetPage 46
Generate Html 1
SaveChanges (1) 6
Render Body 0
Render Sidebar 8