Перейти к содержанию

Label::text

Материал из RAGE MP Wiki Archive
Версия от 12:30, 26 октября 2018; imported>Rootcause (Replaced HTML with template)
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)
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