user_cmd_t
function on_setup_command(cmd)
print(cmd.tick_count)
print(cmd.viewangles)
end
callbacks.add(e_callbacks.SETUP_COMMAND, on_setup_command)
Fields#
| Field | Description |
|---|---|
command_numberint |
[read-only] |
tick_countint |
[read-only] the tick this client was created |
viewanglesangle_t |
|
aim_directionvec3_t |
|
movevec3_t |
movement direction (x = forwardmove, y = sidemove, z = upmove) |
impulseint |
|
weaponselectint |
entity index of weapon to switch to |
weaponsubtypeint |
|
random_seedint |
|
mousedxint |
|
mousedyint |
|
hasbeenpredictedint |
[read-only] |
head_anglesangle_t |
|
head_offsetvec3_t |
Functions#
has_button#
checks if a cmd button is pressed
| Fields | Description |
|---|---|
cmd_buttone_cmd_buttons |
Example
add_button#
add a cmd button
| Fields | Description |
|---|---|
cmd_buttone_cmd_buttons |
Example
remove_button#
removes a cmd button
| Fields | Description |
|---|---|
cmd_buttone_cmd_buttons |
Example
clear_buttons#
removes all cmd buttons