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
GetPlayerItems
Return :
value | type |
---|---|
player items | table |
Parameters :
Name | Type | Description |
---|---|---|
src* | int | Player Source |
Example
GetPlayerClotheItems
Return :
value | type |
---|---|
Player clothe items | table |
Parameters :
Name | Type | Description |
---|---|---|
src* | int | Player Source |
Example
GetTotalWeight
Return :
value | type |
---|---|
weight | int |
Parameters :
Name | Type | Description |
---|---|---|
items* | table | İtem list with amount |
Example
AddItem
Return :
value | type |
---|---|
success | boolen |
Parameters :
Name | Type | Description |
---|---|---|
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 :
value | type |
---|---|
success | boolen |
Parameters :
Name | Type | Description |
---|---|---|
source* | table | Player source |
item* | string | item spawn name |
amount* | int | the amount of item to add |
slot | iny | slot number |
Example
CanGiveItems
Return :
value | type |
---|---|
success | boolen |
Parameters :
Name | Type | Description |
---|---|---|
source | int | Player source |
item* | string | item spawn name |
amount* | int | the amount of item to check |
Example
ClearInventory
Return : None
Parameters :
Name | Type | Description |
---|---|---|
source | int | Player source |
GetItemByName
Return :
value | type |
---|---|
Player Items | table |
Parameters :
Name | Type | Description |
---|---|---|
source | int | Player source |
item | string | Item spawn name |
Example
GetItemBySlot
Return :
value | type |
---|---|
Player Items | Table |
Parameters :
Name | Type | Description |
---|---|---|
source | int | Player source |
slot | int | Slot number |
Example
HasItem
Return :
value | type |
---|---|
Player has the item | boolen |
Parameters :
Name | Type | Description |
---|---|---|
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 :
value | type |
---|---|
Is success | boolen |
Parameters :
Name | Type | Description |
---|---|---|
src* | int | Player source |
slot* | int | Slot number |
value | int | Repair values. Mix: 0, Max 100 |
Example
CreateCustomStashWithItem
Custom creates stash inventory
Return :
value | type |
---|---|
stashUniqId | string |
items | item list |
Parameters :
Name | Type | Description |
---|---|---|
stashUniqId | string | Stash name |
items | table | item list |
Example
GetItemByNameFromSecondInventory
Returns the data of the item in the stash
Return :
value | type |
---|---|
Stash Items | table |
Parameters :
Name | Type | Description |
---|---|---|
stashId* | string | Stash uniq name |
item | string | Item spawn name |
Example
RemoveItemFromSecondInventory
Deletes items from stash
Return :
value | type |
---|---|
success | boolen |
Parameters :
Name | Type | Description |
---|---|---|
stashId* | string | Stash uniq name |
item* | string | item spawn name |
amount* | int | the amount of item to add |
slot | int | Slot number |
Example
UpdateItemMetadata
Updates the item's info data
Return : None
Parameters :
Name | Type | Description |
---|---|---|
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 :
Name | Type | Description |
---|---|---|
invType* | string | trunk, glovebox, stash |
invId* | string | Inventory uniq name or plate |
Example
GiveClotheItem
Return : None
Parameters :
Name | Type | Description |
---|---|---|
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
Last updated