Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. #include "..\..\script_macros.hpp"
  2. /*
  3. File: fn_adminCompensate.sqf
  4. Author: ColinM9991
  5.  
  6. Description:
  7. Figure it out.
  8. */
  9. private ["_value","_action"];
  10. if (FETCH_CONST(life_adminlevel) < 2) exitWith {closeDialog 0; hint localize "STR_ANOTF_ErrorLevel";};
  11. _value = parseNumber(ctrlText 9922);
  12. if (_value < 0) exitWith {};
  13. if (_value > 100000000000) exitWith {hint localize "STR_ANOTF_Fail"};
  14.  
  15. _action = [
  16. format [localize "STR_ANOTF_CompWarn",[_value] call life_fnc_numberText],
  17. localize "STR_Admin_Compensate",
  18. localize "STR_Global_Yes",
  19. localize "STR_Global_No"
  20. ] call BIS_fnc_guiMessage;
  21.  
  22. if (_action) then {
  23. CASH = CASH + _value;
  24. hint format [localize "STR_ANOTF_Success",[_value] call life_fnc_numberText];
  25. closeDialog 0;
  26. } else {
  27. hint localize "STR_NOTF_ActionCancel";
  28. closeDialog 0;
  29. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement