Label::los: Difference between revisions
MrPancakers (talk | contribs) (Created page with "{{Shared}} Updates the los(Line of Sight) on the selected label. == Syntax == <syntaxhighlight lang="javascript"> label.los = true; </syntaxhighlight> == Examples == Updat...") |
m (Replaced HTML with template) |
||
| Line 5: | Line 5: | ||
== Syntax == | == Syntax == | ||
< | <pre> | ||
label.los | Boolean label.los | ||
</ | </pre> | ||
== Examples == | == Examples == | ||
Updates the los of the label through the command /labellos | Updates the los of the label through the command /labellos | ||
{{ServersideCode| | |||
<pre> | |||
< | |||
let startLabel = mp.labels.new("Use /labellos to update the los of this label.", new mp.Vector3(-431.88, 1146.86, 327), | let startLabel = mp.labels.new("Use /labellos to update the los of this label.", new mp.Vector3(-431.88, 1146.86, 327), | ||
{ | { | ||
| Line 30: | Line 29: | ||
player.outputChatBox("Label Updated"); | player.outputChatBox("Label Updated"); | ||
}); | }); | ||
</ | </pre> | ||
}} | |||
== See Also == | == See Also == | ||
{{Label_definition}} | {{Label_definition}} | ||
Latest revision as of 12:31, 26 October 2018
Shared
Updates the los(Line of Sight) on the selected label.
Syntax
Boolean label.los
Examples
Updates the los of the label through the command /labellos
Server-Side
let startLabel = mp.labels.new("Use /labellos to update the los of this label.", new mp.Vector3(-431.88, 1146.86, 327),
{
los: false,
font: 1,
drawDistance: 100,
});
mp.events.addCommand("labellos", (player) => {
if(startLabel.los === true){
startLabel.los = false;
} else {
startLabel.los = true;
}
player.outputChatBox("Label Updated");
});