Advertisement
Guest User

Untitled

a guest
Dec 5th, 2014
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.47 KB | None | 0 0
  1. BankDialogTransferAmount = 13000;
  2. BankDialogPlayerBalance = 13001;
  3. BankDialogBankBalance = 13002;
  4.  
  5. SCTraderDialogCatList = 32000;
  6. SCTraderDialogItemList = 32001;
  7. SCTraderDialogBuyPrice = 32002;
  8. SCTraderDialogSellPrice = 32003;
  9.  
  10. GivePlayerDialogTransferAmount = 14000;
  11. GivePlayerDialogPlayerBalance = 14001;
  12.  
  13.  
  14. BankDialogUpdateAmounts = {
  15. ctrlSetText [BankDialogPlayerBalance, format["%1 %2", (player getVariable ['cashMoney', 0] call BIS_fnc_numberText), CurrencyName]];
  16. ctrlSetText [BankDialogBankBalance, format["%1 %2", (player getVariable ['bankMoney', 0] call BIS_fnc_numberText), CurrencyName]];
  17. };
  18.  
  19. GivePlayerDialogAmounts = {
  20. ctrlSetText [GivePlayerDialogPlayerBalance, format["%1 %2", (player getVariable ['cashMoney', 0] call BIS_fnc_numberText), CurrencyName]];
  21. ctrlSetText [14003, format["%1", (name cursorTarget)]];
  22. };
  23.  
  24. BankDialogWithdrawAmount = {
  25. private ["_amount","_bank","_wealth"];
  26. _amount = parseNumber (_this select 0);
  27. _bank = player getVariable ["bankMoney", 0];
  28. _wealth = player getVariable["cashMoney",0];
  29.  
  30. if(_amount > 999999) exitWith { cutText ["You can not withdraw more then 999,999 gold coins at once.", "PLAIN DOWN"]; };
  31. if(_amount < 1 or _amount > _bank) exitWith { cutText ["You can not withdraw more than is in your bank.", "PLAIN DOWN"]; };
  32.  
  33. player setVariable["cashMoney",(_wealth + _amount),true];
  34. player setVariable["bankMoney",(_bank - _amount),true];
  35.  
  36. PVDZE_plr_Save = [player,(magazines player),true,true] ;
  37. publicVariableServer "PVDZE_plr_Save";
  38. PVDZE_bank_Save = [player];
  39. publicVariableServer "PVDZE_bank_Save";
  40.  
  41. cutText [format["You have withdrawn %1 %2.", [_amount] call BIS_fnc_numberText, CurrencyName], "PLAIN DOWN"];
  42. };
  43.  
  44. BankDialogDepositAmount = {
  45. private ["_amount","_bank","_wealth"];
  46. _amount = parseNumber (_this select 0);
  47. _bank = player getVariable ["bankMoney", 0];
  48. _wealth = player getVariable["cashMoney",0];
  49.  
  50. if(_amount > 999999) exitWith { cutText ["You can not deposit more then 999,999 gold coins at once.", "PLAIN DOWN"]; };
  51. if (_amount < 1 or _amount > _wealth) exitWith { cutText ["You can not deposit more than you have.", "PLAIN DOWN"]; };
  52.  
  53. if( LimitOnBank && ((_bank + _amount ) > MaxBankMoney)) then{
  54. if( (getPlayerUID player in DonatorListZupa ) && ((_bank + _amount ) < MaxDonatorBankMoney)) then{
  55. player setVariable["cashMoney",(_wealth - _amount),true];
  56. player setVariable["bankMoney",(_bank + _amount),true];
  57. cutText [format["You have deposited %1 %2.", [_amount] call BIS_fnc_numberText, CurrencyName], "PLAIN DOWN"];
  58. }else{
  59. cutText [format["You can only have a max of %1 %3, donators %2", [MaxBankMoney] call BIS_fnc_numberText,[MaxDonatorBankMoney] call BIS_fnc_numberText,CurrencyName], "PLAIN DOWN"];
  60. };
  61. }else{
  62. player setVariable["cashMoney",(_wealth - _amount),true];
  63. player setVariable["bankMoney",(_bank + _amount),true];
  64.  
  65. cutText [format["You have deposited %1 %2.", [_amount] call BIS_fnc_numberText, CurrencyName], "PLAIN DOWN"];
  66. };
  67.  
  68. PVDZE_plr_Save = [player,(magazines player),true,true] ;
  69. publicVariableServer "PVDZE_plr_Save";
  70. PVDZE_bank_Save = [player];
  71. publicVariableServer "PVDZE_bank_Save";
  72. };
  73.  
  74. GivePlayerAmount = {
  75. private ["_amount","_target","_wealth"];
  76. _amount = parseNumber (_this select 0);
  77. _target = cursorTarget;
  78. _wealth = player getVariable["cashMoney",0];
  79. _twealth = _target getVariable["cashMoney",0];
  80. _isMan = _target isKindOf "Man";
  81. if (_amount < 1 or _amount > _wealth) exitWith {
  82. cutText ["You can not give more than you currently have.", "PLAIN DOWN"];
  83. };
  84. if (!_isMan) exitWith {
  85. cutText ["You are not facing anyone.", "PLAIN DOWN"];
  86. };
  87. PVDZE_account_Doublecheck = [player];
  88. publicVariableServer "PVDZE_account_Doublecheck";
  89. player setVariable["cashMoney",_wealth - _amount, true];
  90. _target setVariable["cashMoney",_twealth + _amount, true];
  91.  
  92. PVDZE_plr_Save = [player,(magazines player),true,true] ;
  93. publicVariableServer "PVDZE_plr_Save";
  94. PVDZE_plr_Save = [_target,(magazines _target),true,true] ;
  95. publicVariableServer "PVDZE_plr_Save";
  96.  
  97. cutText [format["You gave %1 %2.", _amount, CurrencyName], "PLAIN DOWN"];
  98. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement