G.getmetatable

From GMod Wiki

Revision as of 02:56, 12 December 2010 by Wizard of Ass (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax getmetatable( Entity name )
Where is this used?
Description:
Returns the metatable of the given entity.
Returns: Table
Part of Library: Global Functions
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=G.getmetatable]G.getmetatable [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionAllows you to add a function to a specific meta table
Used onNewerShared.png
Code
local Player = getmetatable("Player")
 
function Player:BlowUP()
   -- Do stuff
end
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox