natives.PRINT_STRING

From GTA Connected
Revision as of 17:11, 11 June 2026 by Roxas (talk | contribs) (Created page with "{{ScriptItem |endpoint = client |games = vc |type = function |name = natives.PRINT_STRING |parameters = float x, float y, string text |parameter1 = float x Screen X position (0.0–1.0, relative) |parameter2 = float y Screen Y position (0.0–1.0, relative) |parameter3 = string text The text to display (maximum 64 characters) |usage = Display a text string at a specific screen position in Vice City. Useful for custom HUD messages, prompts, and labels. |notes = Coordinate...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Client Only icon-vc.png Online and Offline

Available since Client 1.0.0
void natives.PRINT_STRING(float x, float y, string text)
The natives.PRINT_STRING function is used to Display a text string at a specific screen position in Vice City. Useful for custom HUD messages, prompts, and labels.

Parameters

1) float x Screen X position (0.0–1.0, relative).
2) float y Screen Y position (0.0–1.0, relative).
3) string text The text to display (maximum 64 characters).

Return

void This function doesn't return a value.

Notes

  • Coordinates are relative to screen size (0.0–1.0). Text is styled with the game's standard font. Use PRINT_HELP for the help text style or PRINT_BIG for large centered text instead.

Examples

Example 1 - JavaScript:

addCommandHandler("label", function(cmd, args) {
    if (args && args.length > 0) {
        natives.PRINT_STRING(0.05, 0.05, args.join(" "));
        message("Printed at 0.05, 0.05");
    } else {
        message("Usage: /label <text>");
    }
});

Compatibility

There isn't any compatibility information for this function.