Closed ShortKeeper closed 1 year ago
Client.lua line 470 checks whether the players cash balance is lower than the refuel cost. This is where card payments break, because the script never even checks the player's bank balance.
if QBCore.Functions.GetPlayerData().money['cash'] <= refillCost then
should be
if QBCore.Functions.GetPlayerData().money[paymentMethod] < refillCost then
Also replacing <= with < as there is no reason why refueling should fail if the balance is equal to the refill cost. The player just ends up with 0$ if this is the case.
I noticed when selecting to use card it still only checks if you have enough cash instead of checking your bank account. If this could get fixed my server and I would be very happy! For now we will just let everyone know that the card function is not working properly.