Skip to main content

Blip::destroy

Server-side function

JavaScript​

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)