usercmd
The input the player gives to the game for a frame.
Available Properties
serverTimebuttonsweaponoffHandIndexforwardMovesideMove
Methods
removeButton
shoot()
shoot()Set shoot input for this command (frame).
Example:
jump()
jump()Set shoot input for this command (frame).
Example:
isInMenu()
isInMenu()Returns true if you're in a menu or chatting.
Example:
isLeaning()
isLeaning()Returns true if you're leaning.
Example:
isForward()
isForward()Returns true if current cmd moves forward. (Pressing W or equivalent keybind)
Example:
isOnlyForward()
isOnlyForward()Returns true if current cmd ONLY moves forward. Meaning no strafing.
Example:
goForward()
goForward()Set the forwardMove so that this frame will make you move forward for 1 frame.
Example:
isBackward()
isBackward()Returns true if current cmd moves backwards. (Pressing S or equivalent keybind)
Example:
isA()
isA()Returns true if current cmd strafes left. (Pressing A or equivalent keybind)
Example:
isD()
isD()Returns true if current cmd strafes right. (Pressing D or equivalent keybind)
Example:
isAorD()
isAorD()Returns true if current cmd strafes left or right. (Pressing A or D or equivalent keybind)
Example:
isWA()
isWA()Returns true if current cmd uses W+A. (Pressing W + A or equivalent keybinds)
Example:
isWD()
isWD()Returns true if current cmd uses W+D. (Pressing W + D or equivalent keybinds)
Example:
isWAorWD()
isWAorWD()Returns true if current cmd uses W+A or W+D. (Pressing W + A or W + D or equivalent keybinds)
Example:
hasMovement()
hasMovement()Returns true if current cmd has any movement set on it.
Example:
setForwardMove(forwardMove)
setForwardMove(forwardMove)forwardMove- 127 for moving forward, -127 for moving backwards, 0 for no forward move.
Set the forward move for this command.
Example:
setSideMove(sideMove)
setSideMove(sideMove)sideMove- 127 for strafing right, -127 for strafing left, 0 for no side move.
Set the side move for this command.
Example:
walk()
walk()Cancels a sprint.
Example:
sprint()
sprint()Sets the sprint button on the command.
Example:
setButton(button)
setButton(button)button- The button you wish to set
Sets a specific button on the command.
Example:
removeButton(button)
removeButton(button)button - The button you wish to remove
Removes a specific button on the command. Only works before the command is used locally.
Attach a event listener for onAfterCL_CreateNewCommands and not render
if you wish to remove buttons.
Example:
getViewAngles()
getViewAngles()Returns the viewangles that this command has. These are the viewangles which are sent to the server.
Example:
getViewAngles()
getViewAngles()Returns the viewangles that this command has. These are the viewangles which are sent to the server.
Example:
Last updated