-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathatm.sqf
More file actions
31 lines (24 loc) · 1.17 KB
/
atm.sqf
File metadata and controls
31 lines (24 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
if (!(createDialog "RscMenuATM")) exitWith {hint "Dialog Error!";};
//if (isNil "kontostand") then {kontostand = 50000};
_liste = [1, true, false] call INV_DialogPlayers;
if ((_liste select 1) >= 0) then {lbSetCurSel [1, (_liste select 1)];};
_cash = 'cash' call INV_GetItemAmount;
CtrlSetText [101, format ["$%1", (_cash call ISSE_str_IntToStr)]];
CtrlSetText [102, format ["$%1", (Kontostand call ISSE_str_IntToStr)]];
buttonSetAction [2400, format["[call compile lbData [1, lbCurSel 1], ctrlText 2, ""deposit""] execVM ""transact.sqf""; closedialog 0;"] ];
buttonSetAction [2402, format["[ctrlText 6, 0, ""withdraw""] execVM ""transact.sqf""; closedialog 0;"] ];
while {ctrlVisible 1003} do {
_cash = 'cash' call INV_GetItemAmount;
_slider = ctrlText 2;
if (!(_slider call ISSE_str_isInteger)) then {_slider = 0;};
_slider = _slider call ISSE_str_StrToInt;
if (_slider < 0) then {_slider = 0;};
if (lbCurSel 1 == (_liste select 1)) then {
CtrlSetText [4,""];
CtrlSetText [5,""];
} else {
CtrlSetText [4, localize "STRS_bank_dialoge_tax"];
CtrlSetText [5, format ["$%1", ((round((_slider*100)/(100-bank_steuer))) call ISSE_str_IntToStr)]];
};
sleep 0.3;
};