Blip::routeFor: Difference between revisions
No edit summary |
(→Syntax) |
||
| Line 3: | Line 3: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="javascript"> | ||
blip.routeFor(Player player, int color, float scale); | void blip.routeFor(Player player, int color, float scale); | ||
blip.routeFor(Player[] players, int color, float scale); | void blip.routeFor(Player[] players, int color, float scale); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
Revision as of 14:47, 28 December 2017
Function: creates a route to blip from the player(s).
Syntax
void blip.routeFor(Player player, int color, float scale);
void blip.routeFor(Player[] players, int color, float scale);
Required Arguments
- player(s): Array or object of player to which to apply route
- color: ID colour. (All colors available on Blip Colors 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
- Functions
- Properties