Blip::Blip: Difference between revisions
m (→Example) |
MrPancakers (talk | contribs) m (Changed layout, made example simpler.) |
||
| Line 1: | Line 1: | ||
{{Shared}} | |||
Creates a blip to display on your map & minimap. | |||
== Syntax == | |||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
mp.blips.new(sprite, position, | mp.blips.new(sprite, position, | ||
| Line 28: | Line 17: | ||
dimension: dimension, | dimension: dimension, | ||
}); | }); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Parameters === | |||
*'''<span style="font-weight:bold; color:red;">*</span>sprite''': {{RageType|Int}} ([[Blips#Blip_model|Blip sprites]]) | |||
*'''<span style="font-weight:bold; color:red;">*</span>position''': {{RageType|Vector3}} | |||
*'''name''': {{RageType|String}} | |||
*'''scale''': {{RageType|Float}} | |||
*'''color''': {{RageType|Color ID}} ([[Blips#Blip_colors|Blip colors]]) | |||
*'''alpha''': {{RageType|Int}} [0:255] | |||
*'''drawDistance''': {{RageType|Float}} | |||
*'''shortRange''': {{RageType|Boolean}}: Auto-hide on the minimap | |||
*'''rotation''': {{RageType|Vector3}} | |||
*'''dimension''': {{RageType|Int}} | |||
<span style="font-weight:bold; color:red;">*</span> = Required | |||
== Examples == | |||
This creates a blip at the police station. The blip is assigned to the variable '''policeBlip'''. | |||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
let | let policeBlip = mp.blips.new(60, new mp.Vector3(427.95, -981.05, 0), | ||
{ | |||
name: | name: 'Los Santos Police Station', | ||
color: 3, | |||
color: | |||
shortRange: true, | shortRange: true, | ||
}); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | == See Also == | ||
{{Blip_definition}} | {{Blip_definition}} | ||
Revision as of 10:09, 11 May 2018
Shared
Creates a blip to display on your map & minimap.
Syntax
mp.blips.new(sprite, position,
{
name: name,
scale: scale,
color: color,
alpha: alpha,
drawDistance: drawDistance,
shortRange: shortRange,
rotation: rotation,
dimension: dimension,
});
Parameters
- *sprite: Int (Blip sprites)
- *position: Vector3
- name: String
- scale: Float
- color: Color ID (Blip colors)
- alpha: Int [0:255]
- drawDistance: Float
- shortRange: Boolean: Auto-hide on the minimap
- rotation: Vector3
- dimension: Int
* = Required
Examples
This creates a blip at the police station. The blip is assigned to the variable policeBlip.
let policeBlip = mp.blips.new(60, new mp.Vector3(427.95, -981.05, 0),
{
name: 'Los Santos Police Station',
color: 3,
shortRange: true,
});
See Also
- Functions
- Properties