HUDClient

removeBlip

REMOVE_BLIP0x86A652570E5F25DD

The GTA V native REMOVE_BLIP of the HUD namespace, as LS:MP client scripts call it: the global function removeBlip, in JavaScript and in Lua.

SignatureJavaScript
removeBlip(blip: Blip): void
SignatureLua
removeBlip(blip: Blip)
⚠
Known issue

The value of blip does not reach the game yet: LS:MP currently treats this pointer as an output, so the game receives an empty value instead of yours.

Usage

JavaScript
removeBlip(blip);
Lua
removeBlip(blip)

Parameters

ParameterTypeJavaScriptLua
blipBlipnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

In the C++ SDK, this seems not to work-- the blip isn't removed immediately. I use it for saving cars.

E.g.:

Ped pped = playerPedId();
Vehicle v = getVehiclePedIsUsing(pped);
Blip b = addBlipForEntity(v);

works fine.
But later attempting to delete it with:

Blip b = getBlipFromEntity(v);
if (doesBlipExist(b)) removeBlip(&b);

doesn't work. And yes, doesn't work without the doesBlipExist check either. Also, if you attach multiple blips to the same thing (say, a vehicle), and that thing disappears, the blips randomly attach to other things (in my case, a vehicle).

Thus for me, removeBlip(&b) only works if there's one blip, (in my case) the vehicle is marked as no longer needed, you drive away from it and it eventually despawns, AND there is only one blip attached to it. I never intentionally attach multiple blips but if the user saves the car, this adds a blip. Then if they delete it, it is supposed to remove the blip, but it doesn't. Then they can immediately save it again, causing another blip to re-appear.


Passing the address of the variable instead of the value works for me.
e.g.

int blip = addBlipForEntity(ped);
removeBlip(&blip);

Remove blip will currently crash your game, just artificially remove the blip by setting the sprite to a id that is 'invisible'.

Reference

Namespace
HUD HUD
In the game
void REMOVE_BLIP(Blip* blip)
Hash
0x86A652570E5F25DD

Open in the interactive natives reference