Jump to content
Sign in to follow this  
Halfaye

RageNativeUI Menu Refresh ?

Recommended Posts

Hey,

I'm trying to create a menu with RageNativeUI and I want to display a counter in the menu. To keep it updated in the menu I thought I have to refesh the menu in some way. How do I do that or is there any other way ?

Share this post


Link to post
Share on other sites

Thank you . That works. One more question my menu gets loaded if I go on-duty but when I go off-duty and then back on-duty I get one above the other. How can I delete the menu or check if one menu already exists ?

Share this post


Link to post
Share on other sites
On 21/1/2016 at 6:57 PM, Halfaye said:

Thank you . That works. One more question my menu gets loaded if I go on-duty but when I go off-duty and then back on-duty I get one above the other. How can I delete the menu or check if one menu already exists ?

You  can check if your UIMenu is null, if it is create it.

if(myMenu == null)
{
       //your code here...
}

Share this post


Link to post
Share on other sites

I tried that but it doesn't work. I think the problem is that the plugin gets loaded again when I go on duty again. So the UIMenu is always null because the plugin runs two times seperatly and that's why I get two menus.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×