Garry's Mod Wiki

Player:ConCommand

Player:ConCommand( string command )

Description

Runs the concommand on the player. This does not work on bots.

If you wish to directly modify the movement input of bots, use GM:StartCommand instead.

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
command to run

Example

Kills the player using the concommand

Entity( 1 ):ConCommand("kill")
Output: The Player1 dies.

Page Links


Special Pages


Wikis

?

Render Time: 28ms

Session 0
DB GetPage 4
Generate Html 4
SaveChanges 12
Render Body 0
Render Sidebar 6