Setup
Note, this is only for resource developers, don’t install this on your server manually if you’re not making a resource with it.
You have 2 options:
- Download the latest release zip and use the correct version (FiveM/RedM) for your resource. Simply include the DLL as a reference in your C# project and add
using MenuAPI;to each file where you need to use MenuAPI. - Use the NuGet package, which can be found here for FiveM, and here for RedM.
After doing either of the above and you’re ready to build and publish your resource, add files {'MenuAPI.dll'} to your fxmanifest.lua or __resource.lua file, and make sure that you include the MenuAPI.dll file in the folder of your resource.
Old setup instructions
These are the old instructions, they’re still relevant but slightly outdated.
1. Adding the dependency
Section titled “1. Adding the dependency”Just like any other API. Add it as a reference in your C# client project. Check the FiveM docs for info on how to setup a C# resource.
2. Using the API
Section titled “2. Using the API”Checkout the example menu provided in the download. It’ll show you exactly what all the features are. The rest is up to you.
3. Where can I find a reference of all functions, classes and types?
Section titled “3. Where can I find a reference of all functions, classes and types?”A full API Reference is available on these docs. You can also use the source code as a guide, since there are helpful comments throughout, and the example menu for some basic info. It’s designed similar to NativeUI’s structure, so if you’re familiar with NativeUI (C# version) then this should be an easy switch.
