G.RunConsoleCommand

From GMod Wiki

Revision as of 13:05, 8 September 2010 by Cube334 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax RunConsoleCommand( String Command [, String argument 1, String argument 2, ...] )
Where is this used?
Description:
Runs a console command on the server or client.
Returns: nil
Part of Library: Global Functions
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=G.RunConsoleCommand]G.RunConsoleCommand [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThis example turns on the net graph.
Used onNewerClient.png
Code
RunConsoleCommand("net_graph", "3");
OutputN/A


DescriptionThis Example makes the airaccelerate to 100.
Used onNewerServer.png
Code
RunConsoleCommand("sv_airaccelerate", "100");
OutputN/A


Additional Notes

 
"con_enable"
"sv_cheats",
"_restart",
"exec",
"condump",
"connect",
"bind",
"BindToggle",
"alias",
"ent_fire",
"ent_setname",
"sensitivity",
"name",
"r_aspect",
"quit",
"exit",
"lua_run",
"lua_run_cl",
"lua_open",
"lua_cookieclear",
"lua_showerrors_cl",
"lua_showerrors_sv",
"lua_openscript",
"lua_openscript_cl",
"lua_redownload",
"sent_reload",
"sent_reload_cl",
"swep_reload",
"swep_reload_cl",
"gamemode_reload",
"gamemode_reload_cl",
"con_logfile",
"clear",
"rcon_password",
"test_RandomChance",
"plugin_load",
 

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox