Aquiver Inventory v1.0

Informations

​Showcase video​
The folder contains two versions, one of them is fully ESX based (ESX v1 final), using ESX server callbacks and others. The another one is an ESX mashup, which can used as 'standalone' version.
In the standalone version you have to setup more things:
  • Faction safe management
  • Commands (for adding, etc.) i just commented out the esx commands with groups, i do not know what will you use on yours.
In the ESX version:
This inventoy system does not support the esx_shops, esx black_money, etc. variables! You need to make your own scripts for the item adding with shops, etc!
It is not working with the xPlayer.addInventoryItem function, it has different functions, and setters!

Features

  • You can swap items between the slots wherever you want
  • Dropping items (with customizable data, items on the floor)
  • Drag and drop
  • Faction and trunk inventories are built in
  • Trading items to nearby players
  • Using items
  • Adjustable item description (in mysql)
  • Inventory sync between players. (when opened, the interactions are synced, eg. you move items in the trunk, etc.)
  • Adjustable stackable items (true, false) [phone is not stackable, so it is on different slot, etc.]
  • Fast item interaction, when you hold ctrl and left click on the item, it is instantly putted on the secondary or your main inventory.
  • Item notification when you pickup, or when you use slot
  • Vehicle trunk opening with animation, and with boneindex. (if the vehicle has the boot bone)
  • Inventory fast slots (1-2-3-4-5)
  • Weapons support (with bullet update, not ammo bags! it is updating 'realtime' in inventory when you shot a bullet)
  • Settable weights on every inventory, you can even set different weights on every vehicle.
  • You can create inventory easily anywhere. (not shared, you can you these for motel or etc.)
  • You can blacklist items in the secondary inventories. (if you want to store only money in the motel, etc.)
  • You can add starting items, when the player joins the server. (in config.lua file with custom amount, etc.)
  • Configurable distances, etc.
  • Locale files. (currently, english and hungarian language)
  • Optimized. (the trunk, or any other inventory(not faction) only loads when you opening them, after it is stored in a lua table for faster opening)

KEEP IN MIND / BEFORE YOU READ FURTHER

You need to have a basic understanding about Lua language to setup it with your own server! Only buy this resource if you want to spare your time to create the functions or maybe you are having issues with the inventory slot management, etc.
I do not recommend to set it up, when your server is fully messed up with every downloadable ESX script.
I can not set it up for your server, it has more things to do then just put it in the resources folder! As i said, do not buy the script if you are not friendly with the programming language(s).
​

❗ Support !IMPORTANT! ❗

We can not guarantee support with this resource, there is so many requests for inventory systems, we would have +100 messages about setup how to setup properly.
This resource is not just put the folder in and good to go.
I do not recommend buying this script, if you are not familiar with basic LUA or your server resources.
You need couple of things to know how to setup, your server faction system, etc.

BUGS

Just as every code, it can has bugs.
We used it on our server for five months, we did not get any bug report in this case.
If any bug comes up, you can reach out in our Discord server in the support room, but the best would be if you could deal with the error. (Because the inventory will have many edits after you have it, it will be different on every server, maybe you caused the error, etc.)

Dependency files

  • MySQL

Installation

The bought package will contain a .rar which holds up two folders.
One folder has the ESX version for the script, one is the fully standalone version.
​
  • 1. Extract the zip and put the folder into your resources folder.
  • 2. Import the .sql file into your mysql.
  • 3. You will need to add the items to the new items table in the mysql. (There are two example items, when you import the .sql file)
  • 4. You will need to setup your faction in the 'avinventory_factions' mysql table. (There are also examples added) The other mysql tables just store the data, you do not need to mess with them.

Setup with your faction system

I have left the function empty, because i do not know what framework you use. Search for the event 'openFactionSafe'. There will be a commented lines, this was made for esx framework. You can use this as an example.

Setup with your vehicle system

You do not need to modify this, but i recommend. Currently the script does not check any vehicle mysql table if the plate exist in anywhere or not, comes from that every vehicle when you open its trunk creates a new table with the plate.
What is the problem with that?
If your jobs or any other script sets the vehicle plate to the same, ex: 'JOB', then it will be shared on every vehicle, etc.
What is the solution?
Under the 'avInventory:openVehicleTrunk' event, you need to setup your mysql table to check that the plate exist in your vehicles table. (Where the player/factions bought vehicles will be)
​

Configs

config.lua

The config.lua has description for almost every variable which you will need.

cf_vehicle_weights.lua

Nothing to example, add your vehicles here and modify the weights.

cf_factions.lua

If you create a new faction on your server, you need to insert a table here, there are some examples. It is just for defining where the faction safe would be, etc.
​

Giving item(s) to a player

Serverside

1
exports['aquiverInventory']:inventoriesAddItem(inventoryId, itemName, count, callback[not needed])
Copied!

'inventoryId' explanation:

We are creating player inventories under the player's license, if you want to add items, first you need to get the player's license, then use the function. (However, you can create a custom function for yourself, where you just send the source, and let the inventory resource handle it for yourself)

Clientside

There are two functions which you can use.
1
Aquiver.triggerServerCB('aquiver:giveItemThenCallback', function(response), 'money', 500)
Copied!
or
1
TriggerServerEvent('avInventory:giveItem', 'money', 500)
Copied!

Removing item(s) from a player

Serverside

1
exports['aquiverInventory']:inventoriesRemoveItem(inventoryId, itemName, count, callback[not needed])
Copied!
Works the same, you will need to get the player identifier to remove items, or you can also create another function where you just use the source.

Clientside

1
Aquiver.triggerServerCB('playerInventory:removeItemThenCallback', function(response), 'money', 500)
Copied!
or
1
TriggerServerEvent('aquiver:removeInventoryItem', 'money', 500)
Copied!
​

Check how many items does the player have

Serverside

1
exports['aquiverInventory']:inventoriesGetCount(inventoryId, itemName)
Copied!

Clientside

1
Aquiver.triggerServerCB('aquiver:playerItemCount', function(amount), 'sandwich')
Copied!

What is triggerServerCB?

This is a function which works exactly like the ESX callback, i just needed to add it for the standalone version.
If you use the ESX version then you will have the ESX TriggerServerCallback functions.
Last modified 4mo ago