Label::font

From RAGE Multiplayer Wiki
Revision as of 12:33, 26 October 2018 by Rootcause (talk | contribs) (Replaced HTML with template)
Shared

Update the font type of the selected label

Syntax

Number label.font

Examples

Updates the font of the label through the command /labelfont

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

mp.events.addCommand("labelfont", (player, _, fontID) => {
    startLabel.font = parseInt(fontID);
    player.outputChatBox(`You have updated the font of the label to Font ID: ${fontID}`);
});

See Also