OnPlayerRunCmdPre Forward

Called when a clients movement buttons are being processed (Read Only)

void OnPlayerRunCmdPre(int client, int buttons, int impulse, const float vel[3], const float angles[3], int weapon, int subtype, int cmdnum, int tickcount, int seed, const int mouse[2])

Parameters

int client

Index of the client.

int buttons

Current commands (as bitflags - see entity_prop_stocks.inc).

int impulse

Current impulse command.

const float[3] vel

Players desired velocity.

const float[3] angles

Players desired view angles.

int weapon

Entity index of the new weapon if player switches weapon, 0 otherwise.

int subtype

Weapon subtype when selected from a menu.

int cmdnum

Command number. Increments from the first command sent.

int tickcount

Tick count. A client's prediction based on the server's GetGameTickCount value.

int seed

Random seed. Used to determine weapon recoil, spread, and other predicted elements.

const int[2] mouse

Mouse direction (x, y).