Create Blips on Prop Type

Hey, i have created an Script with that you can use the Emergency Callboxes on the Highway. But now i want that every of that locations (the script is linked to the prop prop_sign_road_callbox and checks the distance between the next prop and the player) a blip will be created that you can only see on the minimap.

How can i create an script that do that? I can get with that locales the next prop of that type:

local dumpster = GetClosestObjectOfType(pos.x, pos.y, pos.z, 1.0, dumpsters[i], false, false, false)
local dumpPos = GetEntityCoords(dumpster)
local dist = GetDistanceBetweenCoords(pos.x, pos.y, pos.z, dumpPos.x, dumpPos.y, dumpPos.z, true)

I didn’t understand you clearly, do you want to show on the minimap a blip that sign the closest prop?

Exactly

You can add a blip by using the AddBlipForEntity native, or alternatively if the coords of the object are going to be static AddBlipForCoord. You could then style the blip by using more or less any of the natives starting with “SetBlip…”, like SetBlipColour or SetBlipSprite.

If you want the blip to strictly show on the minimap, but not the main map, you could use SetBlipDisplay, and set the displayId to 5 like so: SetBlipDisplay(blip, 5).

In your case this could look something like this:

local blip = AddBlipForEntity(dumpster) -- Adds the blip
SetBlipSprite(blip, 564) -- Sets the icon sprite to "radar_gr_covert_ops" 
SetBlipColour(blip, 5) -- Sets the colour to yellow
 SetBlipDisplay(blip, 5) -- Only display blip on minimap, not main map

-- Sets blip name
BeginTextCommandSetBlipName("STRING")
AddTextComponentSubstringPlayerName("Emergency Callbox")
EndTextCommandSetBlipName(blip)

Link to blip icons and colours: Blips - Cfx.re Docs

I hope that helps!

1 Like

sorry I didn’t answer I wasn’t on my pc

1 Like

do you have this script? and can you sent him?