(C#) MenuAPI - MAPI v3.0.3 [RedM & FiveM]

If it was that easy then you could’ve done it yourself. Clearly it takes more time than “just adding exports”. Creating a proper wrapper takes time. And I don’t have such time atm. So I won’t be doing it soon. But it will come at some point.

1 Like

mAkE wErK wItH vRp aNd eSx!?

Summary

I like this. This gud resource.

3 Likes

https://docs.vespura.com/mapi/faq/#q-does-this-work-with-this-small-enter-name-here-small-rp-framework Specifically for you :fire:

4 Likes

I already got this added into my project and it works great. Awesome release.

1 Like

Got this implemented into my C# framework and works like a charm.

Great work!

would be nice if it could be an indipendent script with exports to add/remove submenus, so you always have one main menu made with such API and then each script just adds/manages the own submenu

https://images.illusivetea.me/2M754e.png

Beautiful <3

3 Likes

Could you also add something equivalent to UIMenuDynamicListItem used in NativeUI ?

That’s kind of the intend for the wrapper yeah.

I never figured out how to use those/what those actually did. What’s the purpose of those things?

v1.1

  • Add an option to hide the arrows in a list item when it’s not selected

It’s just an item which looks like a listitem but has callbacks for when arrows are pressed and calls the callback eg parse the item as int and add 1 or whatever.
Remember that the original nativeui port had a bug which didnt allow to the callback to be called. It was fixed here https://github.com/citizenfx/NativeUI/commit/c3b1f03a5f7c7372e2d286ce8d3d3d7d0ea4c18c

I use them in my scripts like the handling editor to avoid building big lists everytime

So, it’d “ask” for a value to put it as next each time it needed to change?
hmm, that’s an interesting way of designing such thing. I’ll take a look, but I’m not sure if/how I’ll add this. Maybe it might be easier to implement that as one of the wrapper features. Not sure.

Nope, never used the item because I couldn’t figure out what it was used for/how to use it so I never even bothered looking into it.

It only holds a value and the callback edits it however you prefer.
this is an example of how I use it
https://github.com/neos7/fivem-vstancer/blob/master/Vstancer.Client/Vstancer.cs#L87
and this is Guad’s example https://github.com/Guad/NativeUI/issues/77

Exception loading assembly MenuAPI.net: System.IO.FileNotFoundException: Unable to find the specified file.

Why?`

I try this already

client_scripts {
‘MenuAPI.net.dll’,
‘RoleplayClient.net.dll’
}

all files exist in my folder!

1 Like

MenuAPI.net.dll isn’t a direct client script

load it in the

files {
 "MenuAPI.net.dll"
}

and add MenuAPI.net.dll as a reference in your project.

Huh?
No, load it as a client script. Afaik loading it in files is not enough and it won’t work (properly).

I have mine in-game and working?

Really? That’s odd. I always assumed you needed to run it as a client script since things like NativeUI needed that. It wouldn’t ever work (>1 year ago) if it was just put in the files section. Guess til something.

idk that is just how I loaded it and it works fine.

I’ll give it a try now lol, made me curious.