Blip::setDisplay: Difference between revisions

From RAGE Multiplayer Wiki
mNo edit summary
No edit summary
Line 1: Line 1:
displayId: 8 = shows on radar<br>displayId: 3 = Shows on Main map but not Radar (not selectable on map)<br>displayId: 2 = (Shows on Main map + Radar + selectable)
{{ClientsideJsFunction}}
 
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">blip.setDisplay(p1);</syntaxhighlight>
<syntaxhighlight lang="javascript">blip.setDisplay(displayID);</syntaxhighlight>
 
=== Required Arguments ===
=== Required Arguments ===
*'''p1:''' int
*'''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===
===Return value===
*'''Undefined'''
*'''Undefined'''
==Example==
<br>
<syntaxhighlight lang="javascript">
{{JSContainer|
// todo
{{Example}}
</syntaxhighlight>
<pre>
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.
</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]]
[[Category:TODO: Example]]

Revision as of 19:58, 17 December 2018

Client-Side
Function

 JavaScript



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


JavaScript Syntax

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