Optimization
Last updated
Last updated
This page will show you how to optimize the script, following all the instructions will improve the script performance
Use these server-side events right after any item addition/removal, they can be used anywhere (if you replace the parameters with the proper ones)
Note: if you use something that is not listed in the examples, editing it is down to you, the events listed above works anywhere if used properly
Note: default ESX already has esx:onAddInventoryItem
and esx:onRemoveInventoryItem
which will allow you to not add anything, so follow the example only if you don't have those events for any reason
Go in es_extended/server/classes/player.lua
and add the following codes
Go in es_extended/server/classes/overrides/oxinventory.lua
and add the following codes
Go in qb-inventory/server/main.lua
and add the following codes