RunConsoleCommand

From Garry's Mod
Jump to: navigation, search
 RunConsoleCommand( )

Contents

Description

Executes the given console command with the parameters.

NOTE

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

string command

The command to be executed.

Arguments

vararg arguments

The arguments. Note, that unlike Player:ConCommand, you must pass each argument as a new string, not separating them with a space.

Examples

Example

Changes the gravity to 400 (default 600).

RunConsoleCommand("sv_gravity", "400")


Personal tools
Navigation