Exports, Events
On this page you can see the exports of the map script.
Map open and close exports
exports['bp_mapui']:openmap('minimap', {['width'] = '18%', ['height'] = '18%', ['radius'] = '0', ['top'] = '80%', ['left'] = '1%', ['opacity'] = '0.9' , ['zoom'] = '4'})
exports['bp_mapui']:openmap('bigmap', {['width'] = '70%', ['height'] = '70%', ['radius'] = '0', ['top'] = '50%', ['left'] = '50%', ['opacity'] = '1.0' , ['zoom'] = '4'})
maptype : 'minimap' or 'bigmap'
data : width,height, radius(for circle) , top , left , opactity and zoom
exports['bp_mapui']:closemap();
Add Static Blip (or Dynamic)
exports['bp_mapui']:AddStaticBlip({['name'] = 'Police Run!', ['type'] = 'image', ['coords'] = vec3(206.887909, -1632.079102, 29.717896), ['size'] = {['width'] = 20, ['height'] = 20}, ['url'] = 'https://docs.fivem.net/blips/radar_police_chase.gif' })
AddStaticBlip >> With AddStaticBlip you can add a blip to be added to the list. return >> blipid
exports['bp_mapui']:UpdateStaticBlip(blipid, { coords = vec3(189.204391, -1610.676880, 29.279907), size = { width = 20, height = 20 }, color = "blue" })
UpdateStaticBlip >> You can change the coordinate and size of an actively created blip.
exports['bp_mapui']:RemoveStaticBlip(blipid)
RemoveStaticBlip >> You can delete Blip here.
Add Area Blip
exports['bp_mapui']:AddAreaBlip({ type = "circle", coords = vector3(182.769226, -1609.727417, 29.313599), radius = 100, color = "blue", opacity = 0.6, width = 150, height = 50, rotation = 190, name = "Başlangıç Alanı" })
AddareaBlip >> You can add area blip here !
type = 'cricle' , 'square' , 'poly'
exports['bp_mapui']:UpdateAreaBlip(areid, { coords = vector3(182.769226, -1909.727417, 29.313599), radius = 150, color = "green", name = "Yeni Alan" })
UpdateAreaBlip >> Here you can update the area blip !
exports['bp_mapui']:RemoveAreaBlip(areid)
Add Text Blip
exports['bp_mapui']:AddTextBlip({ coords = vector3(106.562637, -796.246155, 31.470337), text = "Test Blip", color = "blue", backgroundcolor = "white", size = { width = 120, height = 60, fontSize = 16 }, opacity = 0.8 })
exports['bp_mapui']:UpdateTextBlip(textid, { coords = vector3(106.562637, -896.246155, 31.470337), text = "Update Blip", color = "green", size = { fontSize = 18 } })
exports['bp_mapui']:RemoveTextBlip(textid)
DELETE ALL BLIPS
exports['bp_mapui']:DeleteAllBlips(4)
This export deletes all blips.
1 > deletes only static blips
2 > deletes only area blips
3 > deletes only text blips