Blip::doesExist: Difference between revisions

From RAGE Multiplayer Wiki
mNo edit summary
m (category)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
A property to check if a blip exists.
A function to check if a blip exists.


== Syntax ==
== Syntax ==
<syntaxhighlight lang="javascript">
<pre>
blip.doesExist();
blip.doesExist();
</syntaxhighlight>
</pre>


===Return value===
===Return value===
*'''Boolean'''
* {{RageType|Boolean}}


== Examples ==
== Examples ==
An example of returning true of a blip exists.
An example of returning true of a blip exists.


<div class="header" style="background-color: #AE4040; color: #FFFFFF; border: 2px solid #AE4040;">
{{ClientsideCode|
<div style="margin: 10px 10px 10px 10px;"><b>Client-Side</b></div>
<pre>
<syntaxhighlight lang="javascript">
let policeBlip_Client = mp.blips.new(60, new mp.Vector3(407.95, -961.05, 0), {
let policeBlip_Client = mp.blips.new(60, new mp.Vector3(407.95, -961.05, 0),
     color: 3,
     {
    shortRange: true,
        color: 3,
        shortRange: true,
});
});


let doesExist = policeBlip_Client.doesExist();
let doesExist = policeBlip_Client.doesExist();
 
mp.gui.chat.push("Exist: " + doesExist); //Output: "Exist: 1"
mp.gui.chat.push("Exist: " + doesExist);
</pre>
//Output: "Exist: 1"
}}
</syntaxhighlight>
</div>


== See Also ==
== See Also ==
{{Blip_definition}}
{{Blip_definition}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:Blip API]]
[[Category:Blip API]]
[[Category:Client-side Function]]

Latest revision as of 08:18, 6 May 2019

A function to check if a blip exists.

Syntax

blip.doesExist();

Return value

  • Boolean

Examples

An example of returning true of a blip exists.

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

let doesExist = policeBlip_Client.doesExist();
mp.gui.chat.push("Exist: " + doesExist); //Output: "Exist: 1"

See Also