Label::font: Difference between revisions
m (Replaced HTML with template) |
mNo edit summary |
||
| Line 15: | Line 15: | ||
{{ServersideCode| | {{ServersideCode| | ||
<pre> | <pre> | ||
let startLabel = mp.labels.new("Use /labelfont to update the | let startLabel = mp.labels.new("Use /labelfont to update the font of this label.", new mp.Vector3(-431.88, 1146.86, 327), | ||
{ | { | ||
los: false, | los: false, | ||
Latest revision as of 12:34, 26 October 2018
Shared
Update the font type of the selected label
Syntax
Number label.font
- fontID - Number (Font Types)
Examples
Updates the font of the label through the command /labelfont
Server-Side
let startLabel = mp.labels.new("Use /labelfont to update the font 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}`);
});