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
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!
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
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)
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.
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
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