Garry's Mod Wiki

Garry's Mod Wiki

  RunConsoleCommand( string command, ... )

Description

Executes the given console command with the parameters.

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

1 string command
The command to be executed.
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).

RunConsoleCommand("sv_gravity", "400")

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...