[Library] Utility


Installation

Clone or download the resource from here and simply start it, nothing else

Documentation

The documentation of the Utility can be founded here

Snippets

The Utility also offers snippets to help you learn as soon as possible and to speed up the use of the aforementioned

Can be downloaded from the Visual Studio Code extensions menu or from the visual studio online marketplace


Why?

Utility serves to reduce and simplify the long and tedious processes of creating a script.

Take for example the initialization of ESX which translates to StartESX().

I developed this library for my own use, but only once I realized the great help and the great simplification of many steps i decided to publish it to facilitate the work of newbies and veterans, hoping to receive suggestions and support to integrate new features that bring the library to be always updated and useful.

The target of the project

The target of the project is to make simplification and optimization a standard


18 Likes

WHAT IT DO?
i dont get it

makes everything easier, faster, and more optimized, and defines some things that should be a standard, like RegisterKeyMapping that almost nobody knows about and uses.
Read the documentation if you really want to know everything it does!

Will this assist in making scripts is what it does? So if i wanted to make a shop script this can help me from scratch?

Yes, for example the markers are managed totally automatically (including interaction), in a short time I will release some scripts created through the library to better understand the true simplicity.
Check the documentation, it says everything he does and manages

Interesting, comfortable for many, and an easier way to learn for some.

Amazing, thanks for release.

This is really cool! I could see it being used a lot in the future. ESX development tends to get quite messy and this could really help with that. Thanks for the release!

good share ,
but some event from code may lure cheaters.

RegisterServerEvent("Utility:AddMoney", function(type, amount)
            if Config.ESX_integration.AddMoney then
                if type == "cash" then
                    xPlayer.addMoney(amount)
                else
                    xPlayer.addAccountMoney(type, amount)
                end
            end
        end)
RegisterServerEvent("Utility:AddItem", function(item, amount)
            if Config.ESX_integration.AddItem then
                xPlayer.addInventoryItem(item, amount)
            end
        end)
1 Like

I know very well that such a function could be a big flaw in the system, but please before you comment look at the config and look at the documentation.
Anyway thanks for the support :heart:
https://utility-library.github.io/client/esx_integration/AddItem/

1 Like

you right, also this kind of utils might be for slightly advanced users only i think.
so they might already know what they doing and what kind of method can be to prevent the cheats from items and money events.

Great concept hope you continue to add new stuffs on this.

1 Like

Nice job with the utility class! I just want to point out that this is really unsafe: TriggerSyncedEvent - Utility Library and will lead to false positives when banning people

1 Like

Probably i will add the owner of the call via synced events and i will make a list of authorized events/parameters.
If you have any ideas for making TriggerSyncedEvent safer tell me.
Anyway thanks for pointing this out to me

OMG ! it’s amazing, i love you !