Blip::getCoords: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Function to return the coordinates of the blip.
== Syntax ==
<pre>
blip.getCoords();
</pre>
=== Return Value ===
* {{RageType|Vector3}}
== Examples ==
Retrieving the coordinates value from the blip called policeBlip
{{ClientsideCode|
<pre>
let policeBlip = mp.blips.new(60, new mp.Vector3(407.95, -961.05, 0), {
    color: 3,
    shortRange: true,
});
let getBlipCoords = policeBlip.getCoords();
mp.gui.chat.push("Coords: " + JSON.stringify(getBlipCoords)); //Output: "Coords: {"x":407.95001220703125,"y":-961.0499877929688,"z":0}"
</pre>
}}


==Syntax==
<syntaxhighlight lang="javascript">blip.getCoords(blip);</syntaxhighlight>
=== Required Arguments ===
*'''blip:''' Blip
===Return value===
*'''Vector3'''
==Example==
<syntaxhighlight lang="javascript">
// todo
</syntaxhighlight>
==See also==
==See also==
{{Blip_s_function_c}}
{{Blip_definition}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:Blip API]]
[[Category:Blip API]]
[[Category:TODO: Example]]
[[Category:Client-side Function]]

Latest revision as of 08:24, 6 May 2019

Function to return the coordinates of the blip.

Syntax

blip.getCoords();

Return Value

  • Vector3

Examples

Retrieving the coordinates value from the blip called policeBlip

Client-Side
let policeBlip = mp.blips.new(60, new mp.Vector3(407.95, -961.05, 0), {
    color: 3,
    shortRange: true,
});

let getBlipCoords = policeBlip.getCoords();

mp.gui.chat.push("Coords: " + JSON.stringify(getBlipCoords)); //Output: "Coords: {"x":407.95001220703125,"y":-961.0499877929688,"z":0}"

See also