Hi,
Here is a tutorial to adapt the Brinks script from Tom to the BankingSystem.
1- Depack your PBO @TheProgrammer/addons/banking_system.pbo.
2- Go to the folder banking_system/client/atm/money.
3- In your file fn_atm_withdraw.sqf find line 19(by default) :
And add :
4 - in your file fn_atm_deposit.sqf find line 17 (par défaut) :
And add :
5- Repack your PBO.
Here is a tutorial to adapt the Brinks script from Tom to the BankingSystem.
1- Depack your PBO @TheProgrammer/addons/banking_system.pbo.
2- Go to the folder banking_system/client/atm/money.
3- In your file fn_atm_withdraw.sqf find line 19(by default) :
Code:
if (_amount > life_atmbank) exitWith {hint (['STR_NOT_ENOUGH_MONEY','The_Programmer_BankingSystem','BankingSystem_localization'] call theprogrammer_core_fnc_localize)};
And add :
Code:
_TOMFCZ_BRINKS_EXIT = false;
_TOMFCZ_BRINKS_enablesystem = getNumber(missionConfigFile >> "TOMFCZ_BRINKS_V2" >> "enable_system");
_TOMFCZ_BRINKS_maxatm = getNumber (missionConfigFile >> "TOMFCZ_BRINKS_V2" >> "max_atm");
if (_TOMFCZ_BRINKS_enablesystem isEqualTo 1) then {
_TOMFCZ_BRINKS_atm = cursorObject;
_TOMFCZ_BRINKS_atmoney = _TOMFCZ_BRINKS_atm getVariable ["TOMFCZ_ATM_MONEY", 0];
if (_amount > _TOMFCZ_BRINKS_atmoney) then {
_TOMFCZ_BRINKS_EXIT = true;
hint parseText format ["<t color='#e74c3c'>Le distributeur contient seulement $%1</t>", [_TOMFCZ_BRINKS_atmoney] call life_fnc_numberText];
} else {
_TOMFCZ_BRINKS_atmoney = _TOMFCZ_BRINKS_atmoney - _amount;
_TOMFCZ_BRINKS_atm setVariable ["TOMFCZ_ATM_MONEY", _TOMFCZ_BRINKS_atmoney, true];
_TOMFCZ_BRINKS_marker = ["MARKER_", _TOMFCZ_BRINKS_atm] joinString "";
if (_TOMFCZ_BRINKS_atmoney >= _TOMFCZ_BRINKS_maxatm) then { _TOMFCZ_BRINKS_marker setMarkerColor "ColorGreen" } else { _TOMFCZ_BRINKS_marker setMarkerColor "ColorRed" };
};
};
if (_TOMFCZ_BRINKS_EXIT) exitWith {};
4 - in your file fn_atm_deposit.sqf find line 17 (par défaut) :
Code:
if (_value > life_cash) exitWith {hint localize "STR_ATM_NotEnoughCash"};
And add :
Code:
_TOMFCZ_BRINKS_EXIT = false;
_TOMFCZ_BRINKS_enablesystem = getNumber(missionConfigFile >> "TOMFCZ_BRINKS_V2" >> "enable_system");
_TOMFCZ_BRINKS_maxatm = getNumber (missionConfigFile >> "TOMFCZ_BRINKS_V2" >> "max_atm");
if (_TOMFCZ_BRINKS_enablesystem isEqualTo 1) then {
_TOMFCZ_BRINKS_atm = cursorObject;
_TOMFCZ_BRINKS_atmoney = _TOMFCZ_BRINKS_atm getVariable ["TOMFCZ_ATM_MONEY", 0];
_TOMFCZ_BRINKS_atmoney = _TOMFCZ_BRINKS_atmoney + _value;
_TOMFCZ_BRINKS_atm setVariable ["TOMFCZ_ATM_MONEY", _TOMFCZ_BRINKS_atmoney, true];
_TOMFCZ_BRINKS_marker = ["MARKER_", _TOMFCZ_BRINKS_atm] joinString "";
if (_TOMFCZ_BRINKS_atmoney >= _TOMFCZ_BRINKS_maxatm) then { _TOMFCZ_BRINKS_marker setMarkerColor "ColorGreen" } else { _TOMFCZ_BRINKS_marker setMarkerColor "ColorRed" };
};
5- Repack your PBO.