qbcore-framework / qb-inventory

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

[BUG] Putting weapon in trunk while holding #513

Closed ern11 closed 4 months ago

ern11 commented 6 months ago

Summary

When equipping a weapon such as a gun, then opening a trunk and transferring the weapon to the trunk, it does not leave your hand and you can continue to use it or reload it until equipping another item to remove it from your hand

Reproduction

  1. Have a weapon in inventory hotbar and equip
  2. Open trunk
  3. Drag weapon you have in your hand to the trunk from your player inventory
  4. Close trunk and weapon remains in hand

Expected behavior

Expected that the weapon will be unequipped from hand after dragging it into the trunk

Actual behavior

Weapon remains in hand even after it has left the inventory

Additional context

This was done after updating latest qb-inventory and qb-weapons scripts

Last Updated

Today

Custom Resources

n/a

Resource Rename

n/a

GhzGarage commented 6 months ago

I made a commit here, it's still limited as it just checks if the weapon matches. I'm going to continue working on this but i wanted to get a fix out even if it is somewhat annoying for the time being https://github.com/qbcore-framework/qb-inventory/commit/334c179d7cb8f4494b6a9f02358067a003f15ad4

github-actions[bot] commented 4 months ago

This issue has had 60 days of inactivity & will close within 7 days