I am making a C# menu in which you can spawn custom cars put into the server. I have gotten everything setup, but when I build the project, I am given a .dll file. I have put it in my GTA V Script folder, FiveM Application Data Folder, and plugins folder in the FiveM folder. I tried to load it and press the button to open it, but I have not been able to open it.
I am using NativeUI and ScripthookVDotNet for my menu. I added the onKeyDown method and onTick method. Am I loading this completely wrong?
Important Code Below:
using System;
using System.Windows.Forms;
using NativeUI;
using GTA;
public class CarsMenu : Script
{
public CarsMenu()
{
Setup();
Tick += onTick;
KeyDown += onKeyDown;
}
void Setup()
{
menuPool = new MenuPool();
mainMenu = new UIMenu("INSPRP Cars", "SELECT AN OPTION");
menuPool.Add(mainMenu);
//....
mainMenu.OnItemSelect += onMainMenuItemSelect;
}
void onTick(object sender, EventArgs e)
{
if (menuPool != null)
menuPool.ProcessMenus();
}
void onKeyDown(object sender, KeyEventArgs e)
{
if(e.KeyCode == Keys.F10)
{
mainMenu.Visible = !mainMenu.Visible;
}
}
}