Method | Description | |
---|---|---|
CUserCmd ( int index ) : GarrysModLuaShared.Enums | ||
ClearButtons ( ) : void |
Removes all keys from the command. Doesn't prevent movement, see ClearMovement for this.
|
|
ClearMovement ( ) : void |
Clears the movement from the command.
|
|
CommandNumber ( ) : double |
Returns an increasing number representing the index of the user cmd. The value returned is occasionally 0 inside CreateMove hook, so it's advised to check for a non-zero value if you wish to get the correct number.
|
|
GetButtons ( ) : IN |
Returns a bitflag indicating which buttons are pressed.
|
|
GetForwardMove ( ) : double |
The speed the client wishes to move forward with, negative if the clients wants to move backwards.
|
|
GetImpulse ( ) : double |
Gets the current impulse from the client, usually 0.
|
|
GetMouseWheel ( ) : double |
Returns the scroll delta as whole number.
|
|
GetMouseX ( ) : int |
Returns the delta of the angular horizontal mouse movement of the player.
|
|
GetMouseY ( ) : int |
Returns the delta of the angular vertical mouse movement of the player.
|
|
GetSideMove ( ) : double |
The speed the client wishes to move sideways with, positive if it wants to move right, negative if it wants to move left.
|
|
GetUpMove ( ) : double |
The speed the client wishes to move up with, negative if the clients wants to move down.
|
|
GetViewAngles ( ) : Angle |
Gets the direction the client wants to move in.
|
|
KeyDown ( IN key ) : bool |
Returns true if the specified button(s) is pressed.
|
|
RemoveKey ( IN button ) : void |
Removed a key bit from the current key bitflag.
|
|
SelectWeapon ( Weapon weapon ) : void |
Forces the associated player to select a weapon.
|
|
SetButtons ( IN buttons ) : void |
Sets the buttons bitflag.
|
|
SetForwardMove ( double speed ) : void |
Sets speed the client wishes to move forward with, negative if the clients wants to move backwards.
|
|
SetImpulse ( double impulse ) : void |
Sets the impulse to be send together with the command.
|
|
SetMouseWheel ( double delta ) : void |
Sets the scroll delta.
|
|
SetMouseX ( int x ) : void |
Sets the delta of the angular horizontal mouse movement of the player.
|
|
SetMouseY ( int y ) : void |
Sets the delta of the angular vertical mouse movement of the player.
|
|
SetSideMove ( double speed ) : void |
Sets speed the client wishes to move sidewards with, positive to move right, negative to move left.
|
|
SetUpMove ( double speed ) : void |
Sets speed the client wishes to move upwards with, negative to move down.
|
|
SetViewAngles ( Angle viewAngle ) : void |
Sets the direction the client wants to move in.
|
|
TickCount ( ) : double |
Returns tick count since joining the server. Sometimes returns 0.
|
public CUserCmd ( int index ) : GarrysModLuaShared.Enums | ||
index | int | |
return | GarrysModLuaShared.Enums |
public KeyDown ( IN key ) : bool | ||
key | IN | Bitflag representing which button to check. |
return | bool |
public RemoveKey ( IN button ) : void | ||
button | IN | Bitflag to be removed from the key bitflag. |
return | void |
public SelectWeapon ( Weapon weapon ) : void | ||
weapon | Weapon | The weapon entity to select. |
return | void |
public SetButtons ( IN buttons ) : void | ||
buttons | IN | Bitflag representing which buttons are "down". |
return | void |
public SetForwardMove ( double speed ) : void | ||
speed | double | The new speed to request. |
return | void |
public SetImpulse ( double impulse ) : void | ||
impulse | double | The impulse to send. |
return | void |
public SetMouseWheel ( double delta ) : void | ||
delta | double | The scroll delta. |
return | void |
public SetMouseX ( int x ) : void | ||
x | int | Angular horizontal move delta. |
return | void |
public SetMouseY ( int y ) : void | ||
y | int | Angular vertical move delta. |
return | void |
public SetSideMove ( double speed ) : void | ||
speed | double | The new speed to request. |
return | void |
public SetUpMove ( double speed ) : void | ||
speed | double | The new speed to request. |
return | void |
public SetViewAngles ( Angle viewAngle ) : void | ||
viewAngle | Angle | New view angles. |
return | void |