Instructional buttons are the on-screen button prompts shown to players (e.g., “Press E to Enter”).
They use the instructional_buttons scaleform and map to control IDs.
-- Show instructional buttons using scaleform
local scaleform = RequestScaleformMovie("instructional_buttons")
while not HasScaleformMovieLoaded(scaleform) do Wait(0) end
BeginScaleformMovieMethod(scaleform, "CLEAR_ALL")
EndScaleformMovieMethod()
BeginScaleformMovieMethod(scaleform, "SET_DATA_SLOT")
ScaleformMovieMethodAddParamInt(0) -- Slot index
ScaleformMovieMethodAddParamPlayerNameString("~INPUT_CONTEXT~") -- Button
BeginTextCommandScaleformString("STRING")
AddTextComponentSubstringPlayerName("Interact")
EndTextCommandScaleformString()
EndScaleformMovieMethod()
BeginScaleformMovieMethod(scaleform, "DRAW_INSTRUCTIONAL_BUTTONS")
EndScaleformMovieMethod()
DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255, 0)| Button Name | Description | Control ID |
|---|---|---|
| t_Q | Q key | 44 |
| t_E | E key | 46 |
| t_R | R key | 45 |
| t_F | F key | 23 |
| t_G | G key | 47 |
| t_H | H key | 74 |
| t_X | X key | 73 |
| t_Z | Z key | 20 |
| t_C | C key | 26 |
| t_V | V key | 0 |
| t_N | N key | 249 |
| t_M | M key | 244 |
| t_T | T key | 245 |
| t_Y | Y key | 246 |
| t_TAB | Tab key | 37 |
| t_LSHIFT | Left Shift | 21 |
| t_LCTRL | Left Ctrl | 36 |
| t_SPACE | Space | 22 |
| t_ENTER | Enter | 18 |
| t_BACKSPACE | Backspace | 177 |
| t_DELETE | Delete key | 214 |
| t_ESC | Escape key | 200 |
| t_TILDE | Tilde key | 243 |
| t_MOUSE_LEFT | Left Mouse Button | 24 |
| t_MOUSE_RIGHT | Right Mouse Button | 25 |
| t_SCROLL_UP | Scroll Wheel Up | 14 |
| t_SCROLL_DOWN | Scroll Wheel Down | 15 |
| t_ARROW_UP | Up Arrow | 27 |
| t_ARROW_DOWN | Down Arrow | 173 |
| t_ARROW_LEFT | Left Arrow | 174 |
| t_ARROW_RIGHT | Right Arrow | 175 |
| t_F1 | F1 key | 288 |
| t_F2 | F2 key | 289 |
| t_F3 | F3 key | 170 |
| t_F5 | F5 key | 166 |
| t_F6 | F6 key | 167 |
| t_F7 | F7 key | 168 |
| t_F8 | F8 key | 169 |
| t_F9 | F9 key | 56 |
| t_F10 | F10 key | 57 |
| t_1 | Number 1 | 157 |
| t_2 | Number 2 | 158 |
| t_3 | Number 3 | 160 |
| t_4 | Number 4 | 164 |
| t_5 | Number 5 | 165 |
| t_6 | Number 6 | 159 |
| t_7 | Number 7 | 161 |
| t_8 | Number 8 | 162 |
| t_9 | Number 9 | 163 |