G.GetGamemodes

From GMod Wiki

Jump to: navigation, search
Function
Syntax GetGamemodes( )
Description:
Returns a table containing all gamemodes in the called states VFS.
Returns: Table
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=G.GetGamemodes]G.GetGamemodes [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionAn example to show how to print all gamemodes ( Ran with lua_run_cl in a vanilla copy of Garry's Mod ).
Used onNewerShared.png
Code
PrintTable( GetGamemodes( ) )
Output
1:
		Name	=	DogFightArcade
2:
		Name	=	fretta
3:
		Name	=	sandbox
4:
		Name	=	terrortown
 
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox