OpenCommand
This variable sets the open command for inventory, inventory open key can be changed from Fivem Keybinds.
PlayerLevel
This function is for getting the player's level. If you are not using any level system you can edit the return value as false. If you are using a levelsystem you can set your system export or callback as return value.
InventoryTypes
You can add new inventory types from here.
Example
DeleteBlockedItems
Players can delete items by double clicking on item. You can set items here which you don't want to be deleted.
LeaderBoard
RefreshMin (minutes)
You can set leaderboard refresh rate here. (I suggest you to set it 60 or more.)
ListCount
This option sets the listed player count on leaderboard.
StatTypes
You can add new stats to system from here. Don't remove kill and dead!
Example
Set listOnLeaderBoard to sort players for that statistic on leaderboard. Set it false for otherwise.
Set listOnProfile to show that stat on profile section. Set it false for otherwise.
RemoveInventoriesWhenDead
bool: You can directly set return value true if you don't want to check if player is in safezone or etc. Otherwise you can set the return value according to your demand.
deathEvent: You have to set here the event triggered when the player dies.
reviveEvent: You have to set here the event triggered when the player revives.
types: You can type thee inventory types that you want to be cleared when dead.
CloseKeys
This is the keys for closing the inventory.
SecondaryInventoryTypes
This option is for making the inventory type style side by side.
MoneyFormat
If you are using money system set this true, if you are using point system set this false.
You have to add items to this file to get inventory working properly.
For adding new item you can check the example.
Example
You can set the return value according to your is player dead getter
You can use gfx-points for market transactions.
You can download gfx-points on this link: https://github.com/fivegfx/gfx-points
You can set attachments of used weapon in this function according to your attachment data.
Place your server side notification trigger or export.
Use weapon, vehicle or item for type variable.
Rarity is for color effects on inventory items.
Rarity Types
legend
epic
rare
uncommon
common
useItemInfo is for setting the item has info data or not. For example each weapon has different ammo count.
Config.RemoveInventoriesWhenDead = {
bool = function(source)
return true -- you can put your inSafe export to make it dynamic
end,
deathEvent = "esx:onPlayerDeath",
reviveEvent = "esx:onPlayerSpawn", --seconds
types = {
"inventory",
--"protected"
}
}
function IsDead()
return IsPedDeadOrDying(PlayerPeId()) -- returnValue
end
function GetMoney()
return exports["gfx-points"]:GetPoints()
end
function SetWeaponAttachments(ped, weaponHash, info)
end
function Notify(source, text)
-- your notify function here
end
⚙️Configuration
There is five files for configuration. All files at config folder.