Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(readMe): add Event for qb functions #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

N-fire
Copy link

@N-fire N-fire commented Nov 6, 2022

Event OnMoneyChange wasn't triggered which caused issues for example, with ox_inventory where it didn't update player money

Pull Request Description

Event OnMoneyChange wasn't triggered which caused issues for example, with ox_inventory where it didn't update player money
Pull Request Checklist:

  • Have you followed the guidelines in our contributing document and Code of Conduct?
  • Have you checked to ensure there aren't other open for the same update/change?
  • Have you built and tested the resource in-game after the relevant change?

Event OnMoneyChange wasn't triggered which caused issues for example, with ox_inventory where it didn't update player money
@Millusion
Copy link

this makes it so that double the funds are put in the bank account!!

@N-fire
Copy link
Author

N-fire commented Nov 28, 2022

this makes it so that double the funds are put in the bank account!!

@Millusion Can't replicate, could you please give me some repro steps ?

@Millusion
Copy link

on line 32 you run exports.pefcl:addBankBalance(self.PlayerData.source, data)
this adds the balance to the bank account

then on line 46 and 47 you run

TriggerClientEvent('QBCore:Client:OnMoneyChange', self.PlayerData.source, moneytype, amount, "add", reason)
TriggerEvent('QBCore:Server:OnMoneyChange', self.PlayerData.source, moneytype, amount, "add", reason)

This adds again the same amount to the bank account. So double payments are made.

I tested this with latest qb-core and latest PEFCL and when running a loop payment that runs QBCore.Functions.AddMoney with value 100, i see my DB record update with 200 value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants