Blip::setDisplay: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
Line 1: Line 1:
{{ClientsideJsFunction}}
{{ClientsideJsFunction}}


{{JSContainer|
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">blip.setDisplay(displayID);</syntaxhighlight>
<syntaxhighlight lang="javascript">blip.setDisplay(displayID);</syntaxhighlight>
Line 18: Line 19:
*'''Undefined'''
*'''Undefined'''
<br>
<br>
{{JSContainer|
== Example ==
{{Example}}
<pre>
<pre>
let localPlayer = mp.players.local;
let localPlayer = mp.players.local;
Line 28: Line 28:
</pre>
</pre>
}}
}}
==See also==
==See also==
{{Blip_s_function_c}}
{{Blip_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:Blip API]]
[[Category:Blip API]]

Revision as of 20:00, 17 December 2018

Client-Side
Function

 JavaScript



JavaScript Syntax

Syntax

blip.setDisplay(displayID);

Required Arguments

  • displayID: int

Display IDs

  • 8: Shows on both. (Not selectable on map)
  • 5 or 9: Shows on minimap only.
  • 3 or 4: Shows on main map only. (Selectable on map)
  • 2 or 6: Shows on both. (Selectable on map)
  • 0: Doesn't show up, ever, anywhere.


Return value

  • Undefined


Example

let localPlayer = mp.players.local;
let blip = mp.blips.new(2, localPlayer.position, {
  name: localPlayer.name
});
blip.setDisplay(3); // You won't show on my big radar men.


See also