natives.PRINT_STRING
Jump to navigation
Jump to search
Function Client Only ![]()
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.