[Open Source] Dynamic settings control interface

Today I am releasing something I made a while back for a private project and that i think might be useful for others.

This script allows you to easily create (through a config) a Settings interface to have all the settings for every single script on your server (obviously it might need adaptation of those scripts).
The script saves the settings per-character and loads them when they join.

Example of usage:

In config.lua:

{
                uid="pv-cad:edit:hud",
                type="button",
                title= "Move CAD UI positions",
                shouldClose=true,
            },

And then on your script (in this case it was pv-cad - a custom cad):

RegisterNetEvent('pv-cad:edit:hud', function(data)
    SetNuiFocus(true,true);
    SendNUIMessage({
        type = 'hud:edit',
    });
end)

The data variable will contain if it was checked or not (in the checkbox cases) and the value inserted (in the number input type).

4 Likes

nice work bro