Server
You don't need to change functions like AddItem, RemoveItem, GetItemByName or etc in your other scripts, you can use qb's and esx's functions
RegisterStash
invId
string
playerid | name | plate
label
string
Inventory label
slots
number
Slot amount
maxweight
number
Max weight
owner
boolean
If true, the inventory is saved to the first player to open it.
groups
boolean
back compatibility for ox inv (currently not used)
coords
vector3
back compatibility for ox inv (currently not used)
blacklist
table
Blacklist items
ex: {"bandage", "item2"}
whitelist
table
Whitelist items ex: {"bandage", "item2"}
LoadInventory
Return :
items
table
Parameters :
src
int
Player source id
Example
SaveInventory
Parameters :
src
int
Player source id
SetInventory
Parameters :
src
int
Player source id
items
table
Player New Items
GetItemList | Items
Optionally takes the name of an item, returning only data for that item
itemName?
string
Return :
Item list or Item Data
table
Example
GetItemLabel
Return :
İtem label
string
Parameters :
item
string
Item spawn name
Example
GetPlayerItems
Return :
player items
table
Parameters :
src*
int
Player Source
Example
GetPlayerClotheItems
Return :
Player clothe items
table
Parameters :
src*
int
Player Source
Example
GetTotalWeight
Return :
weight
int
Parameters :
items*
table
İtem list with amount
Example
GetFreeWeight
Return :
Free weight
int
Parameters :
src
int
Player source id
Example
GetSlotsByItem
A table containing the slots where the item was found.
Return :
slotsByItems
table
Parameters :
items
table
Table The table containing the items.
itemName
string
string The name of the item to search for.
GetFirstSlotByItem
The slot number of the first matching item, or nil if no match is found.
Return :
SlotNumber
int or nil
Parameters :
items
table
The table of items to search through.
itemName
string
The name of the item to search for.
SetItem
Return :
success
boolen
Parameters :
source*
table
Player source
item*
string
item spawn name
amount*
int
the amount of item to set
Example
AddItem
Return :
success
boolen
Parameters :
source*
table
Player source
item*
string
item spawn name
amount*
int
the amount of item to add
slot
int
slot number
metadata
table
metadata of the item modify
isClotheSlot
boolen
adds item to clothe slots
Example
RemoveItem
Return :
success
boolen
Parameters :
source*
table
Player source
item*
string
item spawn name
amount*
int
the amount of item to add
slot
iny
slot number
metadata
table
item metadata value
Example
CloseInventory
CloseInventory function closes the player inventory
source
int
Player source
CanCarryItem / CanAddItem
Return :
success
boolen
Parameters :
source
int
Player source
item*
string
item spawn name
amount*
int
the amount of item to check
Example
CanCarryItems
Return :
success
boolen
Parameters :
source
int
Player source
items*
table
items table
amount*
int
the amount of item to check
Example
ClearInventory
source
int
Player source
GetItemByName
Return :
Player Item
table
Parameters :
source
int
Player source
item
string
Item spawn name
metadata
table
Item metadata value
Example
GetItemsByName
Return :
Player Items
Table
Parameters :
source
int
Player source
name
string
Item name
metadata
table
Item metadata value
Example
GetItemBySlot
Return :
Player Items
Table
Parameters :
source
int
Player source
slot
int
Slot number
metadata
table
Item metadata value
Example
GetItemCount
The total count of the specified items.
Return :
count
int | nil
The total count of the specified items.
Parameters :
source
int
The player's source ID.
items
table | string
The items to count. Can be either a table of item names or a single item name.
HasItem
Return :
Player has the item
boolen
Parameters :
src*
int
Player source
items*
table or string
The items to check, either a string, array of strings or a key-value table of a string and number with the string representing the name of the item and the number representing the amount
amount
int
The amount of the item to check for, this will only have effect when items is a string or an array of strings
Example
RepairWeapon
Return :
Is success
boolen
Parameters :
src*
int
Player source
slot*
int
Slot number
value
int
Repair values. Mix: 0, Max 100
Example
CreateCustomStashWithItem
Custom creates stash inventory
Return :
stashUniqId
string
items
item list
Parameters :
stashUniqId
string
Stash name
items
table
item list
Example
GetItemByNameFromSecondInventory
Returns the data of the item in the stash
Return :
Items
table
Parameters :
invType
string
stash, trunk or glovebox
invName
string
Inventory name, id or plate
item
string
Item spawn name
metadata
table
Example
RemoveItemFromSecondInventory
Delete items from stash
Return :
success
boolen
Parameters :
invType
string
stash, trunk or glovebox
invName
string
Inventory name, id or plate
item
string
item spawn name
amount
int
the amount of item to add
slot
int
Slot number
metadata
table
Example
AddItemFromSecondInventory
Add items from stash
Return :
success
boolen
Parameters :
invType
string
stash, trunk or glovebox
invName
string
Inventory name, id or plate
item
string
item spawn name
amount
int
the amount of item to add
slot
int
Slot number
metadata
table
Example
UpdateItemMetadata / SetItemData
Updates the item's info data
Return : None
Parameters :
src*
string
Stash uniq name
item*
string
item spawn name
slot*
string
Slot number
metadata*
table
Item new metadata
Example
DeleteInventory
deletes all data of the inventory
Return : None
Parameters :
invType*
string
trunk, glovebox, stash
invId*
string
Inventory uniq name or plate
Example
GiveClotheItem
Return : None
Parameters :
src*
int
Player source
model*
int
Player model (joaat("mp_f_freemode_01") or joaat("mp_m_freemode_01") )
itemName*
string
Clothe items
data*
table
Clothes data
isClotheSlot
bool
Add the item to the clothing slot
Example
RegisterShop
Return : None
Parameters :
shopName*
string
Uniq shop name
items*
table
item list
Example
RegisterCraft
Return : None
Parameters :
category*
string
Uniq crafting category
label*
string
Crafting menu label
items*
table
item list
Example
RegisterJobCraft
Return : None
Parameters :
jobName*
string
Job name
label*
string
Crafting menu label
items*
table
item list
Example
OpenInventoryById
Opens the inventory of a player by their ID
Parameters :
src
int
The player's server ID.
targetSrc
int
The ID of the player whose inventory will be opened.
OpenShop
Parameters :
src
int
The player's server ID.
shopName
string
The name of the shop to open.
s
Last updated