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-'))
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
[x] I have personally loaded this code into an updated qbcore project and checked all of its functionality.
Description
Just two small fixes:
inventoryId
matching ingetItem
. Without using the character starting index infind
, names ending with "drop-" couldn't be used (ammoDrop, cargoDrop, etc) and we can't use underscores in names because of howfind
works: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