RunConsoleCommand
RunConsoleCommand( string command, ... )
Description
Executes the given console command with the parameters.
Will be ran on the local client if used clientside, will run on the server if ran serverside. Keep in mind that the server and client are one and the same in singleplayer and for listen server hosts.
Some commands/convars are blocked from being ran/changed using this function, usually to prevent harm/annoyance to clients. For a list of blocked commands, see Blocked ConCommands.
Arguments
2 vararg arguments
The arguments. Note, that unlike Player:ConCommand, you must pass each argument as a new string, not separating them with a space.
Example
Changes the gravity to 400 (default 600).
Page views: 145,301
Updated: Last Week
Updated: Last Week
Garry's Mod
Rust
Steamworks
Wiki Help