natives.IS BUTTON PRESSED: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
(Add ScriptItem documentation from GTA VC SCM decompile)
 
(Add ScriptItem documentation from GTA VC SCM decompile)
Line 5: Line 5:
|name = natives.IS_BUTTON_PRESSED
|name = natives.IS_BUTTON_PRESSED
|parameters = int padIndex, int button
|parameters = int padIndex, int button
|parameter1 = int padIndex Controller pad index (0 = player 1).
|parameter1 = int padIndex Controller index (0 = player 1).
|parameter2 = int button Button identifier.
|parameter2 = int button Button identifier code.
|usage = Check if a button is pressed.
|usage = checks if a specific button on a controller is currently pressed
|return1 = void
|return1 = void
|returnFail1 = void
|returnFail1 = void
}}
}}

Revision as of 11:55, 13 June 2026

natives.IS_BUTTON_PRESSED

Signature: void natives.IS_BUTTON_PRESSED(int padIndex, int button)

Usage: checks if a specific button on a controller is currently pressed

Parameters

int padIndex Controller index (0 = player 1).
int button Button identifier code.

Return

void

On failure: void