Label::drawDistance: Difference between revisions
MrPancakers (talk | contribs) (Created page) |
m (Replaced HTML with template) |
||
| Line 4: | Line 4: | ||
== Syntax == | == Syntax == | ||
<pre> | |||
Number label.drawDistance | |||
</pre> | |||
*'''distance''' - {{RageType|Number}} | *'''distance''' - {{RageType|Number}} | ||
| Line 13: | Line 13: | ||
Updates the draw distance of the label through the command /labeldistance | Updates the draw distance of the label through the command /labeldistance | ||
{{ServersideCode| | |||
<pre> | |||
< | |||
let startLabel = mp.labels.new("Use /labeldistance to update the color of this label.", new mp.Vector3(-431.88, 1146.86, 327), | let startLabel = mp.labels.new("Use /labeldistance 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 draw distance of the label to: ${dist}`); | player.outputChatBox(`You have updated the draw distance of the label to: ${dist}`); | ||
}); | }); | ||
</ | </pre> | ||
}} | |||
== See Also == | == See Also == | ||
{{Label_definition}} | {{Label_definition}} | ||
Latest revision as of 12:32, 26 October 2018
Shared
Update the draw distance of the selected label
Syntax
Number label.drawDistance
- distance - Number
Examples
Updates the draw distance of the label through the command /labeldistance
Server-Side
let startLabel = mp.labels.new("Use /labeldistance to update the color of this label.", new mp.Vector3(-431.88, 1146.86, 327),
{
los: false,
font: 1,
drawDistance: 100,
});
mp.events.addCommand("labeldistance", (player, _, dist) => {
startLabel.drawDistance = parseInt(dist);
player.outputChatBox(`You have updated the draw distance of the label to: ${dist}`);
});