gmod.GetGamemode

From GMod Wiki

Jump to: navigation, search
Function
Syntax gmod.GetGamemode( String name )
Where is this used?
Description:
Gets the current gamemode's object.
Returns: Table Gamemode table
Part of Library: gmod
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Gmod.GetGamemode]Gmod.GetGamemode [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionAn Example to show how to get the Current Gamemode Name.
Used onNewerShared.png
Code
print(gmod.GetGamemode().Name) // Gets the Name of the Current Gamemode.
OutputPrints Sandbox in the Console(if you started the Server with the Sandbox Gamemode ;) ).


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox