Label::text

From RAGE Multiplayer Wiki
Jump to navigation Jump to search
Shared

Updates the text of a created label.

Syntax

String label.text

Examples

Updates the text of a label through a command.

Server-Side
let startLabel = mp.labels.new("Use /labeltext to update me.", new mp.Vector3(-431.88, 1146.86, 327),
    {
        los: false,
        font: 1,
        drawDistance: 100,
    });

mp.events.addCommand("labeltext", (player, _, text) => {
    startLabel.text = text;
    player.outputChatBox("Label Updated");
});

See Also