Difference between revisions of "Blip::unrouteFor"

From RAGE Multiplayer Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
__NOTOC__
+
__TOC__
 +
 
 +
{{ServersideJsFunction}}
 +
 
 
This function used for remove route to blip for player.
 
This function used for remove route to blip for player.
  
 +
{{JSContainer|
 
==Syntax==
 
==Syntax==
 
<syntaxhighlight lang="javascript">
 
<syntaxhighlight lang="javascript">
Line 13: Line 17:
 
That's example get's first blip's and remove route fro
 
That's example get's first blip's and remove route fro
  
{{ServerSide}}
+
{{ServersideCode|
<syntaxhighlight lang="javascript">
+
<pre lang="javascript">
 
mp.events.addCommand("unrouteFirstBlip", (player) => {
 
mp.events.addCommand("unrouteFirstBlip", (player) => {
const blip = mp.blips.at(0);
+
  const blip = mp.blips.at(0);
 
+
  if (blip) {
if (blip) {
+
    blip.unrouteFor(player);
blip.unrouteFor(player);
+
  }
}
 
 
});
 
});
</syntaxhighlight>
+
</pre>
 +
}}
 +
}}
  
 
==See Also==
 
==See Also==
 
{{Blip_definition}}
 
{{Blip_definition}}

Latest revision as of 12:21, 2 December 2019

Server-Side
Function

Js.png JavaScript



This function used for remove route to blip for player.

JavaScript Syntax
Jslogo.png

Syntax

blip.unrouteFor(Player player);
blip.unrouteFor(Player[] players);

Required Arguments

  • player(s): Array or object of player to which to remove route

Example

That's example get's first blip's and remove route fro

Server-Side
mp.events.addCommand("unrouteFirstBlip", (player) => {
  const blip = mp.blips.at(0);
  if (blip) {
    blip.unrouteFor(player);
  }
});


See Also