Skip to content

Commit 3acb954

Browse files
GhzGaragegitbook-bot
authored andcommitted
GITBOOK-86: change request with no subject merged in GitBook
1 parent ad012f7 commit 3acb954

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

qbcore-resources/qb-inventory.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -392,16 +392,13 @@ end, true)
392392

393393
## SetItemData
394394

395-
Sets a specific key-value pair in a player's item data and updates the player's inventory with the modified item
396-
397-
{% hint style="warning" %}
398-
This function uses GetItemByName to find the itemName being passed
399-
{% endhint %}
395+
Sets a specific key-value pair in a player's item data and updates the player's inventory with the modified item. If a slot number is provided, it directly targets the item in that slot. Otherwise, it uses `GetItemByName` to find the first matching item by name
400396

401397
* source: `number`
402398
* itemName: `string`
403399
* key: `string`
404-
* val: `string | table`
400+
* val: `string | table` 
401+
* slot: `number` (optional)
405402
* <mark style="color:yellow;">returns</mark>: `boolean`
406403

407404
```lua

0 commit comments

Comments
 (0)