qbcore-framework / qb-drugs

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

Double sales [BUG] #115

Closed TheRealWinnex closed 1 year ago

TheRealWinnex commented 1 year ago

Describe the bug An export to remove target option during cornerselling is placed at the wrong line, giving players the ability to sell twice to each NPC.

To Reproduce Steps to reproduce the behavior:

  1. Turn on cornerselling.
  2. Be approchaed by an NPC.
  3. Accept the offer.
  4. While the progressbar is running, target the NPC again.
  5. Sell again after your sale.

Expected behavior Target export should be removed right after the sale. The fix is to move the code up a few lines. At around line 240 There's Wait(650) line, the exports['qb-target']:RemoveZone('sellingPed') should be above this, not under it. I put mine right under the serverevent for cornerselling.

github-actions[bot] commented 1 year ago

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