Aquiver Inventory v2.0

Informations

TODO Forum post
​Showcase video​
​Tebex link (buy)​

READ FIRST

This resource is standalone, so it is not linked to any framework, comes from that you will need to adjust a few things to run smoothly, eg. faction system and others.
You need to have a custom shop system to buy items, because the shop will not open in the 'secondary' inventory like with the most of the FiveM inventory systems.
If you are not familiar with basic lua scripting, eg. how tables work etc, i do not recommend to buy this resource, inventory systems can become really complicated if you are a beginner. I can not reply in an hour for you if you are stuck with something, best you can do is to request help in our Discord server at the right channel. (Not in private message please, so if anyone has the same question, then it can be searched on our Discord)

Features

  • Customizable frontend styling, colors and many other.
  • Drag and drop & move between slots.
  • Item 'movings' are synced between the opened players. (Important with faction safes and trunks, etc.)
  • Item definer constructor(Useitem, description, etc.)
  • Action slots (1-5)
  • Dropping items on the floor, with defined model. (defined it in the itemdefiner)
  • Item notification system, when you pickup or use item with action slot. (1-5)
  • Fast item interaction, when you hold shift and left click on the item, it is instantly put on the secondary or your main inventory.
  • The little clothing icons, let your character dress up&down. Basically its a dpclothing implemented.
  • Vehicle trunk opening with animation, and with boneindex. (if the vehicle has the boot bone)
  • Customizable weight system. (Factionsafes, Players, etc. and differently on each vehicle)
  • Stacking system. (You just need to set a variable, then everything will be recognized, so you will not have double weapons)
  • You can add starting items, when the player joins the server. (in config.lua file with custom amount, etc.)
  • Locale files both Lua and JS (need for the html). (currently, english and hungarian language)
  • Custom weapon system. We use bullets, not weapon mags. (Attachments not supported, but you can make it afterwards)
  • Not a MySQL eater. We only have 3-4 mysql calls. We load the player inventories when the player joins. The vehicle trunks loading on the first open, etc. And we save the inventories with a timeouter. (editable frequency in the config file)
  • Unique variables on items. (many as you want, you can make the attachments system with it, etc.) Example
1
AquiverInventories[identifier].addItem(
2
'WEAPON_PISTOL',
3
1,
4
{ component = 'SILENCER', durability = 20} -- NEED TO BE A 'KEY' TABLE!
5
)
Copied!

Dependency files

  • MySQL
  • cfx baseevents.
We use baseevents for the player death event. If you have different death system implemented, you can change the event.
This event will handle the item deleting on the player death. (If you have it enabled in the config, and the item is deletable)

Installation

  • ​
    1. 1.
      Unzip the rar file, and copy the folder in your Fivem server
    2. 2.
      Edit or create the locale LUA files for your nationality. (locales/)
    3. 3.
      Edit the HTML locale file. (html/js/locale.js)
    4. 4.
      Modify the config.lua and config_weights.lua files, more informations will be downwards.
    5. 5.
      Import the av_inventory.sql file into your database.
    6. 6.
      Read the advanced setup downwards.

Config.lua file

  • You can change your lua locale setter. Config.Locale = 'en'
  • Config.Debug (enables or disables the console logs [server,client also]) Default is set to true, set it to false if you do not want to receive any messages.
  • Config.FactionSafes You will need to add your faction names and safe positions here.
  • Config.OtherInventories You can insert here global inventories, house inventories or any other. (More description downwards, about the assign function.)
  • Config.Weapons Add your weapons and specify the required bullets here. important, your item name should match the GTA V weapon name. eg: WEAPON_PISTOL
  • Config.SaveFreq How often save the inventories.
  • Config.DeleteItemsDeath Delete tradable/deletable items on player death or not.
  • Config.StartingItems Starting inventory items. (eg. player joins your server)
  • Config.DefaultSlots You can change the inventory slots amount. (vehicles, safes, etc.)
  • Config.DefaultWeights You can change the inventory maximum weight. (If the vehicle is defined in the config_weights.lua, then it will use the defined weight, not the default which is set here.)
  • Config.IgnoreSlotsOnPickup If you do not want the system, to add items instantly to your slots (1-5), then disable this, then the given item will be added from the starting slots. (6.)
  • Config.vehicleExistDatabase Very important! We are creating the vehicletrunks/gloveboxes on open, so when the player is near any vehicle, the system will check that the vehicle he is trying to open is really existing in the database, so we can not open npc vehicles, etc. This is not a repetetive mysql function, because when the data is loaded in, we are using simply serverside tables to store the datas.
  • Config.isPlayerAdmin Add your admin system here, so you can use the give command.
  • Config.getPlayerFaction Add your faction getter here. (It should return the faction name, which is set in the Config.FactionSafes, thats how we recognize the player that he has the rights to open it.)
  • Config.GetPlayerName You can change it to your roleplay name getter.
  • Functions.SendNotification Modify it to your notification system.

config_weights.lua

This will store your vehicle storage datas. Add your vehicles here with a defined trunk & glovebox weight.
1
VehicleWeights = {
2
['blade'] = { trunk = 350, glovebox = 50 },
3
['buccaneer'] = { trunk = 300, glovebox = 65 }
4
}
Copied!

Registering items.

We have our custom item definer system. You will not need to add your items in the MySQL.
This function will take care the item datas, such as weight and the use functions, etc.
Here is an example.
1
defineItem({
2
item = 'bread', -- image name and main item name
3
formatname = 'KenyΓ©r', -- formatted name
4
type = 'food',
5
tradable = true, -- player can drop & put items into storages like glovebox. (IF TRUE)
6
candelete = true, -- delete item on death?
7
weight = 1.25, -- weight / quantity
8
stackable = true, -- is this item stackable? example: weapons are not
9
description = 'Bread is a staple food prepared from a dough of flour and water, usually by baking.', -- item description
10
model = 'v_ret_247_swtcorn2', -- item drop model
11
}, function(source, item, slot)
12
local identifier = Config.getIdentifier(source)
13
if not AquiverInventories[identifier] then return end
14
Config.DebugMsg(string.format('(player:%s) %s used on slot %s', source, item, slot))
15
​
16
local success = AquiverInventories[identifier].removeItemAtSlot(slot, 1)
17
if success then
18
Config.DebugMsg('Removed one amount from the bread.')
19
end
20
end)
Copied!
You can use this function in other resources also with the export function, but keep in mind, if the inventory is not loaded yet and some other resource wants to register with the function, then it will not happen. If you want it to be loaded first in other resource, then simply define a dependency in your other resource fxmanifest.lua
dependencies {'av_inventory'}

❗ 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 your server faction works and others.
Last modified 2mo ago