Difference between revisions of "Blip::routeFor"

From RAGE Multiplayer Wiki
Jump to navigation Jump to search
m (Replaced HTML with template)
 
Line 1: Line 1:
__NOTOC__
+
__TOC__
 +
{{ServersideJsFunction}}
 +
 
 
Creates a route to the blip from the player's location.
 
Creates a route to the blip from the player's location.
  
 +
{{JSContainer|
 
==Syntax==
 
==Syntax==
 
<pre>
 
<pre>
Line 24: Line 27:
 
});
 
});
 
</pre>
 
</pre>
 +
}}
 
}}
 
}}
  
 
==See Also==
 
==See Also==
 
{{Blip_definition}}
 
{{Blip_definition}}

Latest revision as of 12:17, 2 December 2019

Server-Side
Function

Js.png JavaScript



Creates a route to the blip from the player's location.

JavaScript Syntax
Jslogo.png

Syntax

blip.routeFor(player, color, scale);

Required Arguments

  • player:' Player object or an array of player objects
  • color: Int (All colors available on Blip Colors page)
  • scale: Float

Example

This example will create a command for creating blip and add route to the player who entered it:

Server-Side
mp.events.addCommand("routeBlip", (player) => {
	const position = player.position;
	const blip = mp.blips.new(1, position);

	blip.routeFor(player, 2, 1);
});


See Also