Blip::routeFor: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "This function used for create route to blip for player. ==Syntax== <syntaxhighlight lang="typescript"> blip.routeFor(Player player, int colour, float scale); blip.routeFor(Pl...")
 
mNo edit summary
Line 1: Line 1:
__NOTOC__
This function used for create route to blip for player.
This function used for create route to blip for player.



Revision as of 08:03, 28 December 2017

This function used for create route to blip for player.

Syntax

blip.routeFor(Player player, int colour, float scale);
blip.routeFor(Player[] players, int colour, float scale);

Required Arguments

  • player(s): Array or object of player to which to apply route
  • colour: ID colour. (All colours available on Blip Colours page)
  • scale: Blip route scale

Example

That's example will create 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