File tree 1 file changed +39
-0
lines changed
1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -501,6 +501,45 @@ RegisterCommand('hasMultipleItemsWithAmounts', function(source)
501
501
end
502
502
end , true )
503
503
```
504
+ ## GetFreeWeight
505
+ Returns the available space in weight of a specified player source's inventory.
506
+
507
+ ``` lua
508
+ exports [' qb-inventory' ]:GetFreeWeight (source )
509
+ ```
510
+
511
+ * source: ` number `
512
+ * <mark style =" color :yellow ;" >returns</mark >: ` number `
513
+
514
+ Example:
515
+
516
+ ``` lua
517
+ RegisterCommand (' getFreeWeight' , function (source )
518
+ local freeWeight = exports [' qb-inventory' ]:GetFreeWeight (source )
519
+ print (' Free Weight: ' .. freeWeight )
520
+ end , true )
521
+ ```
522
+ ## GetSlots
523
+ Returns the occupied and empty slots of a specified identifier's inventory. (Player source or id of inventory / drop)
524
+
525
+ ``` lua
526
+ exports [' qb-inventory' ]:GetSlots (identifier )
527
+ ```
528
+
529
+ * identifier: ` number | string `
530
+ * <mark style =" color :yellow ;" >returns</mark >: slotsUsed: ` number ` , slotsFree: ` number `
531
+
532
+ Example:
533
+
534
+ ``` lua
535
+ RegisterCommand (' getSlots' , function (source , args )
536
+ local invId = args [1 ]
537
+ if not invId then return end
538
+
539
+ local slotsUsed , slotsFree = exports [' qb-inventory' ]:GetSlots (invId )
540
+ print (' Slots Used: ' .. slotsUsed , ' Slots Free: ' .. slotsFree )
541
+ end , true )
542
+ ```
504
543
505
544
## GetSlotsByItem
506
545
You can’t perform that action at this time.
0 commit comments