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

Need Export to hide the map #6

Open
NeiZeOne opened this issue Oct 9, 2022 · 7 comments
Open

Need Export to hide the map #6

NeiZeOne opened this issue Oct 9, 2022 · 7 comments

Comments

@NeiZeOne
Copy link

NeiZeOne commented Oct 9, 2022

Need Export to hide the map

@NickReagan
Copy link

@NeiZeOne Like an export to hide the minimap? Or one to hide the main map, setting it back to default?

@NeiZeOne
Copy link
Author

NeiZeOne commented Oct 12, 2022

@NickReagan Like an export to hide the minimap [ocrp]

@NickReagan
Copy link

NickReagan commented Oct 12, 2022

@NickReagan Like an export to hide the minimap [ocrp]

I will work on this for you.

NickReagan added a commit to IC-Technologies/improved_postal_map that referenced this issue Oct 12, 2022
Added new 'hideminimap' and 'showminimap' exports([suggestion](ocrp#6)) and changed to latest fx version.
NickReagan added a commit to IC-Technologies/improved_postal_map that referenced this issue Oct 12, 2022
Added new 'hideminimap' and 'showminimap' exports([suggestion](ocrp#6))
@NickReagan
Copy link

NickReagan commented Oct 12, 2022

@NickReagan Like an export to hide the minimap [ocrp]

Added. 22de116

@NeiZeOne
Copy link
Author

thank you very much, but what is now the triggerevent to hide it cant find it

@NickReagan
Copy link

thank you very much, but what is now the triggerevent to hide it cant find it

@NeiZeOne
In your script, you can do something as simple as

RegisterCommand('toggleminimap', function()
	minimaphidden = not minimaphidden;
	if minimaphidden then
		exports.OCRP_postal_map.showminimap()
	else
		exports.OCRP_postal_map.hideminimap()
	end
end)

Keep in mind the OCRP_postal_map is just the base resource name. It must be whatever the folder is called wither that be postal_map, etc.

exports.(resource_name).showminimap()
exports.(resource_name).hideminimap()

@NickReagan
Copy link

Also keep in mind these are client side exports so must be called in a client side script. So client.lua, etc.

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

2 participants