qbcore-framework / qb-inventory

Slot Based Inventory System Used With QB-Core :school_satchel:
GNU General Public License v3.0
51 stars 370 forks source link

Improved getItem inventory matching and fix inventory being stuck #540

Open swkeep opened 1 week ago

swkeep commented 1 week ago

Description

Just two small fixes:

  1. Fixed inventoryId matching in getItem. Without using the character starting index in find, names ending with "drop-" couldn't be used (ammoDrop, cargoDrop, etc) and we can't use underscores in names because of how find works:
    -- both of these return the same result
    print(('drop-'):find('drop-'))
    print(('drop_'):find('drop-'))
  2. Fixed an issue where players could get stuck in inv_busy = true state, if they had their inventory open before we restarted the inventory. This one typically is not an issue for most servers, but developers may notice it.

    Checklist