Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mission Blips not unloading #623

Open
Sigma-Erebus opened this issue Jun 3, 2020 · 2 comments
Open

Mission Blips not unloading #623

Sigma-Erebus opened this issue Jun 3, 2020 · 2 comments

Comments

@Sigma-Erebus
Copy link

as the title says, if i have a mission, the destination shows up without issues, but after the mission is completed, you'd expect it to be gone, but no. this gets annoying after having done quite some missions. i've tried messing about with the code a bit myself, but nothing seems to work so far. so i'd like to ask how (if it's possible at all) to remove the mission destination blips once the mission has been completed, or once a step of the mission been completed, because between different steps of the same mission, the destinations to prior steps don't get removed either.

@Sigma-Erebus
Copy link
Author

another thing i have noticed is that when using the command setEntity from the map module, a named entity doesn't get edited, but gets a second one added with the same name. so if you for example have a function that checks for permissions, and adds a map blip if you do, every time that function gets called, a new blip appears on your map. so you end up with many blips overlapping each other. this is not necessarily a problem, but say you want to change the blip to another shape, you'd still have all the other blips behind it that will show behind the then newly added blip.

@Sigma-Erebus
Copy link
Author

Sigma-Erebus commented Jun 6, 2020

apparently only in very specific pieces of code it works, i just had a piece of code creating blips for permission groups, and this time it only places a single one on the map, because it has the same entity name/identifier:

for _,user in pairs(self:getUsersByPermission("mib.vehicle")) do --take warp locations if mibgaragemarkeradded == false then local ment = {"PoI", {blip_id = 50, blip_color = 40}} ment[2].title = "MIB Garage" ment[2].pos = {-143.94145202637,-576.31005859375,32.424457550049-1} vRP.EXT.Map.remote.setEntity(user.source, "markermibgarage", ment[1], ment[2]) ment[2].pos = {3613.3413085938,3740.943359375,28.690097808838-1} vRP.EXT.Map.remote.setEntity(user.source, "markermibgarage", ment[1], ment[2]) ment[2].pos = {-1801.9827880859,3103.0966796875,32.841804504395-1} vRP.EXT.Map.remote.setEntity(user.source, "markermibgarage", ment[1], ment[2]) mibgaragemarkeradded = true end end

the above piece of code only places a single blip on the map, whilst the below piece of code places three in the correct places:

for _,user in pairs(self:getUsersByPermission("mib.vehicle")) do --take warp locations if mibgaragemarkeradded == false then local ment = {"PoI", {blip_id = 50, blip_color = 40}} ment[2].title = "MIB Garage" ment[2].pos = {-143.94145202637,-576.31005859375,32.424457550049-1} vRP.EXT.Map.remote.setEntity(user.source, "markermibgarage1", ment[1], ment[2]) ment[2].pos = {3613.3413085938,3740.943359375,28.690097808838-1} vRP.EXT.Map.remote.setEntity(user.source, "markermibgarage2", ment[1], ment[2]) ment[2].pos = {-1801.9827880859,3103.0966796875,32.841804504395-1} vRP.EXT.Map.remote.setEntity(user.source, "markermibgarage3", ment[1], ment[2]) mibgaragemarkeradded = true end end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant