Advertisement
Guest User

Untitled

a guest
Aug 30th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. #include "..\..\script_macros.hpp"
  2. /*
  3. File: fn_atmMenu.sqf
  4. Author: Bryan "Tonic" Boardwine
  5.  
  6. Description:
  7. Opens and manages the bank menu.
  8. */
  9. private["_units","_type"];
  10.  
  11. if(!life_use_atm) exitWith {
  12. hint format [localize "STR_Shop_ATMRobbed",(LIFE_SETTINGS(getNumber,"noatm_timer"))];
  13. };
  14.  
  15. if(!dialog) then {
  16. if(!(createDialog "Life_atm_management")) exitWith {};
  17. };
  18.  
  19. disableSerialization;
  20. _units = CONTROL(2700,2703);
  21.  
  22. lbClear _units;
  23. CONTROL(2700,2701) ctrlSetStructuredText parseText format["<img size='1.7' image='icons\bank.paa'/> $%1<br/><img size='1.6' image='icons\money.paa'/> $%2",[BANK] call life_fnc_numberText,[CASH] call life_fnc_numberText];
  24.  
  25. {
  26. _name = _x GVAR ["realname",name _x];
  27. if(alive _x && (!(EQUAL(_name,profileName)))) then {
  28. switch (side _x) do {
  29. case west: {_type = "Cop"};
  30. case civilian: {_type = "Civ"};
  31. case independent: {_type = "EMS"};
  32. };
  33. _units lbAdd format["%1 (%2)",_x GVAR ["realname",name _x],_type];
  34. _units lbSetData [(lbSize _units)-1,str(_x)];
  35. };
  36. } foreach playableUnits;
  37.  
  38. lbSetCurSel [2703,0];
  39.  
  40. if(isNil {(grpPlayer GVAR "gang_bank")}) then {
  41. (CONTROL(2700,2705)) ctrlEnable false;
  42. (CONTROL(2700,2706)) ctrlEnable false;
  43. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement