qbcore-framework / qb-drugs

Drugs Script For QB-Core :herb:
GNU General Public License v3.0
34 stars 185 forks source link

Unable to recover stolen drugs #106

Closed Ginjakz closed 1 year ago

Ginjakz commented 1 year ago

Describe the bug When an NPC steals your last remaining drug(s) from you during Corner Seeling and you kill them and attempt to search ped, you get a box that comes up that you got your drugs back, but they are not added back to your inventory.

To Reproduce Steps to reproduce the behavior:

  1. Corner sell any available drug 1 at a time until you are robbed
  2. Kill NPC
  3. Use target to search ped
  4. Drugs are not put back in inventory

Expected behavior You should get your drugs back? Works fine when you still have a supply in your inventory, only when its your last drug that was stolen from you

Screenshots https://medal.tv/games/gta-v/clips/UO9GV4wTCl8xL/d1337GkCXyag?invite=cr-MSw2Sk4sNDIzOTEzNjks

Questions (please complete the following information):

Additional context Add any other context about the problem here.

parham-tehrani commented 1 year ago

I am having the same issue currently, as i managed to track it down a little. as seen ,this only happens when they take all your drugs, like if you have 1 bag left, and they take that 1 bag, the drugrefresh recognizes as you got nothing left so it stops the selling and the recovery gets cancelled out

Hutch93-png commented 1 year ago

following, I noticed this too. didnt realize it was only when it was your last bag

MentalIllness commented 1 year ago

Should be fixed in the next PR