Scaleforms
debugScaleform.lua
This module renders debug text in-game when debugMode
is enabled. Useful for live diagnostics or UI placement feedback.
debugScaleForm(textTable, loc)
Displays an overlay of lines of text at the specified screen location.
Note: This only works if debugMode
is set to true
.
Parameters:
textTable
(table
): A list of strings to display.loc
(vector2
, optional ): Top-left anchor point on screen ( default:vec2(0.05, 0.65)
).
Example:
instructionalButtons.lua
This module renders instructional button prompts using native scaleforms in GTA V and RedM.
Note: Because it uses native scaleforms, it must be run inside a while
loop to remain visible.
makeInstructionalButtons(info)
Draws instructional buttons using the GTA scaleform instructional_buttons
.
Parameters:
info
(table
): An array of tables, where each entry contains:keys
(table
): Control key codes (e.g.,{38, 29}
).text
(string
): The label for the button.
Example:
makeRedInstructionalButtons(info, title)
Experimental: Displays prompts using RedM-style PromptSetGroup
API.
Note: Still must be run in a loop for visibility.
Example:
scaleform_basic.lua
This module includes helper functions for 3D text rendering and UI overlays using basic native scaleform techniques.
DrawText3D(coord, text, highlight)
Draws 3D text in the world at the given coordinates, with optional highlight.
Includes a semi-transparent black background box for visibility.
Parameters:
coord
(vector3
): World position to draw text.text
(string
): Text content.highlight
(boolean
, optional ): Highlights~w~
sections with yellow.
Example:
DisplayHelpMsg(text)
Shows a help message in the top-left corner of the screen.
Example:
displaySpinner(text)
Shows a busy spinner with a message (e.g., "Saving...").
Example:
stopSpinner()
Hides any active busy spinner (client-only).
Example:
timerBars.lua
This module provides a native scaleform-based timer bar HUD. Ideal for displaying tasks, loading indicators, or time-sensitive objectives.
createTimerHud(title, data, alpha)
Draws a timer bar with custom label and right-aligned values using the native GTA HUD system.
Parameters:
title
(string
): Title/header displayed on the bar.data
(table
): List oflabel = value
entries to display (max 4 rows).alpha
(number
, optional ): Opacity of the bar (0-255).
Example:
Last updated