user_cmd
get_command_number
get_command_number()
-> number
Returns the command_number
field.
Usage
local cmd_number = cmd:get_command_number();
get_view_angles
get_view_angles()
-> number, number, number
Returns the viewangles
field.
Usage
local x, y, z = cmd:get_view_angles();
set_view_angles
set_view_angles(x: number, y: number, z: number)
Sets the viewangles
field.
Parameters
Name | Type | Description |
---|---|---|
x |
number | Pitch |
y |
number | Yaw |
z |
number | Roll |
Usage
cmd:set_view_angles(0, 90, 0);
get_move
get_move()
-> number, number
Returns the forwardmove
and sidemove
properties.
Usage
local forward, side = cmd:get_move();
set_move
set_move(forwardmove: number, sidemove: number)
Sets the forwardmove
and sidemove
properties.
Parameters
Name | Type | Description |
---|---|---|
forwardmove |
number | Forward move |
sidemove |
number | Side move |
Usage
user_cmd:set_move(0, 0); -- player won't move
get_buttons
get_buttons()
-> number
Returns the pressed buttons.
Usage
local buttons = cmd:get_buttons();
set_buttons
set_buttons(buttons: number)
Sets the buttons
fields.
Parameters
Name | Type | Description |
---|---|---|
buttons |
number | Value |
Usage
cmd:set_buttons(0);