Label::font: Difference between revisions
MrPancakers (talk | contribs) (Created page) |
m (Replaced HTML with template) |
||
| Line 4: | Line 4: | ||
== Syntax == | == Syntax == | ||
<pre> | |||
Number label.font | |||
</pre> | |||
*'''fontID''' - {{RageType|Number}} ([[Fonts_and_Colors#DrawText_Fonts|Font Types]]) | *'''fontID''' - {{RageType|Number}} ([[Fonts_and_Colors#DrawText_Fonts|Font Types]]) | ||
| Line 13: | Line 13: | ||
Updates the font of the label through the command /labelfont | Updates the font of the label through the command /labelfont | ||
{{ServersideCode| | |||
<pre> | |||
< | |||
let startLabel = mp.labels.new("Use /labelfont to update the color of this label.", new mp.Vector3(-431.88, 1146.86, 327), | let startLabel = mp.labels.new("Use /labelfont to update the color of this label.", new mp.Vector3(-431.88, 1146.86, 327), | ||
{ | { | ||
| Line 27: | Line 26: | ||
player.outputChatBox(`You have updated the font of the label to Font ID: ${fontID}`); | player.outputChatBox(`You have updated the font of the label to Font ID: ${fontID}`); | ||
}); | }); | ||
</ | </pre> | ||
}} | |||
== See Also == | == See Also == | ||
{{Label_definition}} | {{Label_definition}} | ||
Revision as of 12:33, 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 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}`);
});