Blip::unrouteFor: Difference between revisions
(→Syntax) |
No edit summary |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
__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 | ||
{{ServersideCode| | |||
<pre lang="javascript"> | |||
< | |||
mp.events.addCommand("unrouteFirstBlip", (player) => { | mp.events.addCommand("unrouteFirstBlip", (player) => { | ||
const blip = mp.blips.at(0); | |||
if (blip) { | |||
blip.unrouteFor(player); | |||
} | |||
}); | }); | ||
</ | </pre> | ||
}} | |||
}} | |||
==See Also== | ==See Also== | ||
{{ | {{Blip_definition}} | ||
Latest revision as of 12:21, 2 December 2019
Server-Side Function
This function used for remove route to blip for player.
JavaScript Syntax
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
- Functions
- Properties