Label::los: Difference between revisions

From RAGE Multiplayer Wiki
(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 ==


<syntaxhighlight lang="javascript">
<pre>
label.los = true;
Boolean label.los
</syntaxhighlight>
</pre>


== Examples ==
== Examples ==
Updates the los of the label through the command /labellos
Updates the los of the label through the command /labellos


<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
{{ServersideCode|
<div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div>
<pre>
<syntaxhighlight lang="javascript">
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");
});
});
</syntaxhighlight>
</pre>
</div>
}}


== 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");
});

See Also