class Pad
package fivem.client.natives
Static methods
staticDisableInputGroup(padIndex:Int):Dynamic
staticGetLocalPlayerAimState2():Int
Same behavior as GET_LOCAL_PLAYER_AIM_STATE but only used on the PC version. staticGetTimeSinceLastInput(padIndex:Int):Int
The number of milliseconds since last padIndex registered pressedstaticIsDisabledControlReleased(padIndex:Int, control:Int):Bool
staticIsUsingKeyboard(padIndex:Int):Bool
staticIsUsingKeyboard2(padIndex:Int):Bool
staticSetControlLightEffectColor(padIndex:Int, red:Int, green:Int, blue:Int):Dynamic
staticSetControlNormal(padIndex:Int, control:Int, amount:Float):Bool
This is for simulating player input.
staticSetCursorLocation(x:Float, y:Float):Bool
staticSwitchToInputMappingScheme(name:String):Bool
Used in carsteal3 script with p0 = "Carsteal4_spycar".
S*staticdisableAllControlActions(padIndex:Int):Dynamic
staticdisableControlAction(padIndex:Int, control:Int, disable:Bool):Dynamic
Example: CONTROLS::DISABLE_CONTROL_ACTION(2, 19, true) disables the switching UI from appearing both when using a keyboard and Xbox 360 controller. Needs to be executed each frame.
Control group 1 and 0 gives the same results as 2. Same results for all players.
staticenableAllControlActions(padIndex:Int):Dynamic
enum ePadType {
PLAYER_CONTROL = 0,
CAMERA_CONTROL = 1,
FRONTEND_CONTRO = 2
};staticenableControlAction(padIndex:Int, control:Int, enable:Bool):Dynamic
control values and meaning: github.com/crosire/scripthookvdotnet/blob/dev_v3/source/scripting/Control.cs
and
https://docs.fivem.net/game-references/controls/
0, 1 and 2 used in the scripts.
Control values from the decompiled scripts:
0,1,2,3,4,5,6,8,9,10,11,14,15,16,17,19,21,22,24,25,26,30,31,32,33,34,35,36,
37,44,46,47,59,60,65,68,69,70,71,72,73,74,75,76,79,80,81,82,86,95,98,99,100
,101,114,140,141,143,172,173,174,175,176,177,178,179,180,181,187,188,189,19
0,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,217,218,219,2
20,221,225,228,229,230,231,234,235,236,237,238,239,240,241,242,245,246,257,
261,262,263,264,286,287,288,289,337,338,339,340,341,342,343
INPUTGROUP_MOVE
INPUTGROUP_LOOK
INPUTGROUP_WHEEL
INPUTGROUP_CELLPHONE_NAVIGATE
INPUTGROUP_CELLPHONE_NAVIGATE_UD
INPUTGROUP_CELLPHONE_NAVIGATE_LR
INPUTGROUP_FRONTEND_DPAD_ALL
INPUTGROUP_FRONTEND_DPAD_UD
INPUTGROUP_FRONTEND_DPAD_LR
INPUTGROUP_FRONTEND_LSTICK_ALL
INPUTGROUP_FRONTEND_RSTICK_ALL
INPUTGROUP_FRONTEND_GENERIC_UD
INPUTGROUP_FRONTEND_GENERIC_LR
INPUTGROUP_FRONTEND_GENERIC_ALL
INPUTGROUP_FRONTEND_BUMPERS
INPUTGROUP_FRONTEND_TRIGGERS
INPUTGROUP_FRONTEND_STICKS
INPUTGROUP_SCRIPT_DPAD_ALL
INPUTGROUP_SCRIPT_DPAD_UD
INPUTGROUP_SCRIPT_DPAD_LR
INPUTGROUP_SCRIPT_LSTICK_ALL
INPUTGROUP_SCRIPT_RSTICK_ALL
INPUTGROUP_SCRIPT_BUMPERS
INPUTGROUP_SCRIPT_TRIGGERS
INPUTGROUP_WEAPON_WHEEL_CYCLE
INPUTGROUP_FLY
INPUTGROUP_SUB
INPUTGROUP_VEH_MOVE_ALL
INPUTGROUP_CURSOR
INPUTGROUP_CURSOR_SCROLL
INPUTGROUP_SNIPER_ZOOM_SECONDARY
INPUTGROUP_VEH_HYDRAULICS_CONTROL
Took those in IDA Pro.Not sure in which order they go staticgetControlGroupInstructionalButton(padIndex:Int, controlGroup:Int, p2:Bool):String
staticgetControlInstructionalButton(padIndex:Int, control:Int, p2:Bool):String
formerly called _GET_CONTROL_ACTION_NAME incorrectly
p2 appears to always be true.
p2 is unused variable in function.
EG:
GET_CONTROL_INSTRUCTIONAL_BUTTON (2, 201, 1) / *INPUT_FRONTEND_ACCEPT (e.g. Enter button)* /
GET_CONTROL_INSTRUCTIONAL_BUTTON (2, 202, 1) / *INPUT_FRONTEND_CANCEL (e.g. ESC button)* /
GET_CONTROL_INSTRUCTIONAL_BUTTON (2, 51, 1) / *INPUT_CONTEXT (e.g. E button)* /
gtaforums.com/topic/819070-c-draw-instructional-buttons-scaleform-movie/#entry1068197378
0, 1 and 2 used in the scripts. 0 is by far the most common of them. staticgetControlNormal(padIndex:Int, control:Int):Float
staticgetControlUnboundNormal(padIndex:Int, control:Int):Float
Seems to return values between -1 and 1 for controls like gas and steering.staticgetControlValue(padIndex:Int, control:Int):Int
staticgetDisabledControlNormal(padIndex:Int, control:Int):Float
staticgetDisabledControlUnboundNormal(padIndex:Int, control:Int):Float
staticgetLocalPlayerAimState():Int
Returns the local player's targeting mode. See SET_PLAYER_TARGETING_MODE.
staticisControlEnabled(padIndex:Int, control:Int):Bool
staticisControlJustPressed(padIndex:Int, control:Int):Bool
Returns whether a control was newly pressed since the last check.
staticisControlJustReleased(padIndex:Int, control:Int):Bool
Returns whether a control was newly released since the last check.
staticisControlPressed(padIndex:Int, control:Int):Bool
Returns whether a control is currently pressed.
staticisControlReleased(padIndex:Int, control:Int):Bool
Returns whether a control is currently not pressed.
staticisDisabledControlJustPressed(padIndex:Int, control:Int):Bool
staticisDisabledControlJustReleased(padIndex:Int, control:Int):Bool
staticisDisabledControlPressed(padIndex:Int, control:Int):Bool
staticisLookInverted():Bool
staticsetInputExclusive(padIndex:Int, control:Int):Dynamic
staticsetPadShake(padIndex:Int, duration:Int, frequency:Int):Dynamic
p0 always seems to be 0
duration in milliseconds
frequency should range from about 10 (slow vibration) to 255 (very fast)
example:
SET_PAD_SHAKE(0, 100, 200);