GM:StartCommand

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

Description

Allows you to change the players inputs before they are processed by the server.

This is basically a shared version of GM:CreateMove.

NOTE This function is also called for bots, making it the best solution to control them so far
NOTE This hook is predicted, but not by usual means, this hook is called when a CUserCmd is generated on the client, and on the server when it is received, so it is necessary for this hook to be called clientside even on singleplayer

Arguments

Player ply

The player

Arguments

CUserCmd ucmd

The usercommand
Personal tools
Navigation