GM:StartCommand
This hook is predicted. This means that in singleplayer, it will not be called in the Client realm.
Description
Allows you to change the players inputs before they are processed by the server. This function is also called for bots, making it the best solution to control them.
This is basically a shared version of GM:CreateMove.
This hook is predicted, but not by usual means, it 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
Example
Example of how you'd control a bot using this hook.
The example causes all bots to go kill any players they can get to with crowbars.