[FREE] Fivem UI Wrapper

Thanks for taking the time to look at my post.

I’ll just start by introducing myself. My name is Indy or you can call me Jones, I have been coding LUA since 2016 and started on Garry’s Mod. I have been coding a custom framework over the past year for a server I am making but we can talk about that another time.

Now let’s talk about this script. While trying to make my framework I ran into the issue of having to try and merge UI’s into the same resource or just having to make multiple resources for a few files. Personally, I didn’t like that and wanted to create something that could replicate FiveM’s iFrames so I could clean up my files. This script allows you to make as many UI’s as you want in as many resources as you want. This probably won’t be very optimised for a lot of UI’s but together we could make it a lot better. I would love any and all feedback on this so feel free to let me know what you think. This script will contain all the UI’s you create so console.log will show as ui-wrapper but you can tell which file at the end of the log.

Anyway, that’s enough reading for you. Below is the Github for this project.

ui-wrapper Release

To-Do

  • Find more bugs

Changes Made

  • Create UI → Lua handler
  • Example Script
  • More Detailed Guide
  • Create export to replace SendNUIMessage
18 Likes

Please provide a screenshot or showcase here on the forums.

3 Likes

Hi Tay,
The script I have made can’t be shown in a screenshot or showcase. The script is a developer tool that will allow developers to put mutiple UI’s into a single script. I could show an example screenshot of that but it will mislead people into thinking it comes with a UI already. I hope this explains it a bit better. If you have anything else please let me know.

3 Likes

great work! cool release :grinning_face_with_smiling_eyes:

1 Like

i really like this , i was just wondering about the same thing/issue with using multiple ui couple days ago :smiley: nice work , but i wonder how the callbacks work , i mean from the ui to the scripts , did you manage to handle this also ?

1 Like

Hi Arcticx2
I completely forgot about it. I will add it to my to-do list. Thanks for reminding me :grinning:.

2 Likes

i also might be wrong but i saw we can create ui with exports like exports['ui-wrapper']:uiCreateCustom for example but we cant pass the nui message to it with exports , am i right ? if im right then i guess if we can pass those with exports would be better , for example SendNUIMessage({ addon = "Scoreboard", players = 10, playerid = 1, }) instead if this we do smt like this => exports['ui-wrapper']:uiSendMessage() bla bla …

1 Like

I didn’t add it because we can just add add-on to the sendnuimessage but it could be easier for people to use an export that they can put the identifier and then pass the table. I will also look at adding that. Thanks for the feedback.

I just want to say thank you for everyone who has let me know about issues with the script. I have made some changes that should fix a few things. I will also be updating it more in the next few days for the things that I missed. If anyone has any other issues they can see please let me know.

Nice Utility, Could probably do with a bit more work for final product, but overall, decent job :slight_smile:

Hi CyberSec,
Happy to make some changes. What could be worked on to make it a final product?

Bit confused, why would you need this? I thought the reason to have everything in the same resource was so players wouldn’t have to download the same MUI, React etc whatever imports you do alot like 50 times and sharing data between different ‘apps’ would be easy + its cleaner to have everything in the same project if you do it right

Nice release really helpfull to me