Blip::setDisplay: Difference between revisions
mNo edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
{{ClientsideJsFunction}} | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="javascript">blip.setDisplay( | <syntaxhighlight lang="javascript">blip.setDisplay(displayID);</syntaxhighlight> | ||
=== Required Arguments === | === 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=== | ===Return value=== | ||
*'''Undefined''' | *'''Undefined''' | ||
<br> | |||
{{JSContainer| | |||
// | {{Example}} | ||
</ | <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]] | ||
Revision as of 19:58, 17 December 2018
Client-Side Function
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
- Blip::Blip
- Blip.addTextComponentSubstringName
- Blip.doesExist
- Blip.endTextCommandSetName
- Blip.getAlpha
- Blip.getColour
- Blip.getCoords
- Blip.getFirstInfoId
- Blip.getInfoIdDisplay
- Blip.getInfoIdEntityIndex
- Blip.getInfoIdPickupIndex
- Blip.getInfoIdType
- Blip.getHudColour
- Blip.getNextInfoId
- Blip.getSprite
- Blip.isFlashing
- Blip.isMissionCreator
- Blip.isOnMinimap
- Blip.isShortRange
- Blip.hideNumberOn
- Blip.pulse
- Blip.setAlpha
- Blip.setAsFriendly
- Blip.setAsMissionCreator
- Blip.setAsShortRange
- Blip.setBright
- Blip.setCategory
- Blip.setColour
- Blip.setCoords
- Blip.setDisplay
- Blip.setFade
- Blip.setFlashes
- Blip.setFlashesAlternate
- Blip.setFlashInterval
- Blip.setFlashTimer
- Blip.setHighDetail
- Blip.setNameFromTextFile
- Blip.setNameToPlayerName
- Blip.setPriority
- Blip.setRotation
- Blip.setRoute
- Blip.setRouteColour
- Blip.setScale
- Blip.setSecondaryColour
- Blip.setShowCone
- Blip.setShowHeadingIndicator
- Blip.setSprite
- Blip.showNumberOn