Blip::destroy

From RAGE Multiplayer Wiki
Revision as of 13:26, 6 July 2024 by Shr0x (talk | contribs) (Created page with " {{ServersideJsFunction}} {{JSContainer| This method will destroy (delete) a created blip completely. == Syntax == <syntaxhighlight lang="javascript"> blip.destroy() </syntaxhighlight> == Example == In this example we add two commands, one to spawn a vehicle and one to destroy them. {{ServersideCode| <syntaxhighlight lang="javascript"> //Create a blip. let policeBlip = mp.blips.new(60, new mp.Vector3(427.95, -981.05, 0), { name: 'Los Santos Police Station', color: 3,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Server-Side
Function

 JavaScript



JavaScript Syntax

This method will destroy (delete) a created blip completely.

Syntax

blip.destroy()

Example

In this example we add two commands, one to spawn a vehicle and one to destroy them.

Server-Side
//Create a blip.
let policeBlip = mp.blips.new(60, new mp.Vector3(427.95, -981.05, 0), {
	name: 'Los Santos Police Station',
	color: 3,
	shortRange: true,
});

//Destroy the created blip after 10 seconds
setTimeout(() => {
    if (policeBlip && mp.blips.exists(policeBlip)) {
        policeBlip.destroy();
    }
}, 10_000)


See Also