Garry's Mod Wiki

Garry's Mod Wiki

  table FindMetaTable( string metaName )


Returns the meta table for the class with the matching name.

Internally returns debug.getregistry()[metaName]

You can learn more about meta tables on the Meta Tables page.

You can find a list of meta tables that can be retrieved with this function on TYPE enum. The name in the description is the string to use with this function.


1 string metaName
The object type to retrieve the meta table of.


1 table
The corresponding meta table.


Adds a very simple function for checking if a player is sick to the player metatable.

local meta = FindMetaTable("Player") function meta:IsSick() return true end -- Sometime later... local ply = Entity(1) if ( ply:IsSick() ) then ply:ChatPrint( "Get well soon, " .. ply:Nick() .. "!" ) ply:ChatPrint( "I just don't understand how you're always sick..." ) end
Get well soon, Player1! I just don't understand how you're always sick...

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 twice a day. Edits and history are not available.

Last Parsed: Loading...