Difference between revisions of "Blip::Blip"

From RAGE Multiplayer Wiki
Jump to navigation Jump to search
 
Line 3: Line 3:
 
Creates a blip to display on your map & minimap.
 
Creates a blip to display on your map & minimap.
  
 +
{{JSContainer|
 
== Syntax ==
 
== Syntax ==
  
Line 21: Line 22:
  
 
=== Parameters ===
 
=== Parameters ===
*'''<span style="font-weight:bold; color:red;">*</span>sprite''': {{RageType|Int}} ([[Blips#Blip_model|Blip sprites]])
+
*'''{{Required}}sprite''': {{RageType|Int}} ([[Blips#Blip_model|Blip sprites]])
*'''<span style="font-weight:bold; color:red;">*</span>position''': {{RageType|Vector3}}
+
*'''{{Required}}position''': {{RageType|Vector3}}
 
*'''name''': {{RageType|String}}
 
*'''name''': {{RageType|String}}
 
*'''scale''': {{RageType|Float}}
 
*'''scale''': {{RageType|Float}}
Line 32: Line 33:
 
*'''dimension''': {{RageType|Int}}
 
*'''dimension''': {{RageType|Int}}
  
 
+
== Example ==
<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'''.
 
This creates a blip at the police station. The blip is assigned to the variable '''policeBlip'''.
Line 48: Line 46:
 
});
 
});
 
</pre>
 
</pre>
 +
}}
 
}}
 
}}
  

Latest revision as of 12:40, 2 December 2019

Js.png JavaScript


Creates a blip to display on your map & minimap.

JavaScript Syntax
Jslogo.png

Syntax

mp.blips.new(sprite, position,
{
    name: name,
    scale: scale,
    color: color,
    alpha: alpha,
    drawDistance: drawDistance,
    shortRange: shortRange,
    rotation: rotation,
    dimension: dimension,
    radius: radius,
});

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: Float
  • dimension: Int

Example

This creates a blip at the police station. The blip is assigned to the variable policeBlip.

Shared
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