Log in to reply
 

Native UI Mod Menu Keeps Disappearing and Reappearing (Flickering or Glitching)



  • So recently I've been trying to make a Native UI mod menu and have been following some tutorials about it. They are good in all but for some reason my Native UI menu keeps disappearing and reappearing every time I press the hotkey for it. It also doesn't stop until I reinsert my mods again. Any help about this would be appreciated.

    Code Below:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Drawing;
    using System.Windows.Forms;
    using GTA;
    using GTA.Math;
    using GTA.Native;
    using GTA.NaturalMotion;
    using NativeUI;
    
    namespace GTA_First_Mod
    {
       public class Class1 : Script
         {
            MenuPool modMenuPool;
            UIMenu mainMenu;
         }
    
       public Class1()
            { 
                Interval = 1000;
                Tick += OnTick;
                KeyDown += OnKeyDown;
                KeyUp += OnKeyUp;
                modMenuPool = new MenuPool();
                mainMenu = new UIMenu("Mod Menu", "Select an Option");
                modMenuPool.Add(mainMenu);
            }
    
        public void OnTick(object sender, EventArgs e)
            {
                if (modMenuPool != null)
                    modMenuPool.ProcessMenus();
            } 
    
       public void OnKeyUp(object sender, KeyEventArgs e)
            { 
    
            }
    
            
         public void OnKeyDown(object sender, KeyEventArgs e)
            { 
               if(e.KeyCode == Keys.U && !modMenuPool.IsAnyMenuOpen())
                {
                    mainMenu.Visible = !mainMenu.Visible;
                }
            }
        }
    }
    

    If you don't understand what the problem here is I can take a video or screenshot.



  • I think I found out what the problem was. I was have a tick interval which meant it was disappearing and reappearing.


  • Banned

    This post is deleted!

Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.