Player/ConCommand

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

Contents

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.

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

command to run

Examples

Example

Kills the player using the concommand

Entity( 1 ):ConCommand("kill")

Output:

The Player1 dies.
Personal tools
Navigation