English [Billing System] Pay bills by cash or bank transfer

  • Auteur de la discussion Auteur de la discussion Mathis
  • Date de début Date de début

Mathis

The-Programmer
Membre du personnel
29/12/19
503
16
48
1 100
Welcome to this tutorial which will allow you to pay your Billing System invoices in cash or by bank transfer ;)
This tutoriel is from the help requests from ArmaEliteRP ArmaEliteRP.

Let's go !

In your @The_Programmer/addons/billing_system/client/fn_lbChangedFacture.sqf, replace this line :
Code:
_payBtn buttonSetAction "[] call max_facture_fnc_payFacture;";
by this :
Code:
_payBtn buttonSetAction "[] spawn max_facture_fnc_payFacture;";

And in your @The_Programmer/addons/billing_system/client/fn_payFacture.sqf, delete this line :
Code:
if (life_atmbank < _price) exitWith {hint (["STR_NOT_ENOUGHT_MONEY","Max_Settings_Facture","Facture_Localization"] call theprogrammer_core_fnc_localize);};

And in the same file, replace theses lines :
Code:
life_atmbank = life_atmbank - _price;
[1] call SOCK_fnc_updatePartial;
by theses :
Code:
_bank = [
    "How would you like to pay this invoice ?",
    "Payment method",
    "Bank transfer",
    "Cash"
] call BIS_fnc_guiMessage;

_exit = false;
if (_bank) then {
    if (life_atmbank < _price) exitWith {_exit = true; hint (["STR_NOT_ENOUGHT_MONEY","Max_Settings_Facture","Facture_Localization"] call theprogrammer_core_fnc_localize);};

    life_atmbank = life_atmbank - _price;
    [1] call SOCK_fnc_updatePartial;
} else {
    if (life_cash < _price) exitWith {_exit = true; hint (["STR_NOT_ENOUGHT_MONEY","Max_Settings_Facture","Facture_Localization"] call theprogrammer_core_fnc_localize);};

    life_cash = life_cash - _price;
    [0] call SOCK_fnc_updatePartial;
};
if (_exit) exitWith {};

And it's good !

Sincerely,
Forum Manager - Mathis
 
Dernière édition par un modérateur: