Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private ["_done","_LastUsedTime","_Time"];
- _done = false;
- _LastUsedTime = 3600;
- _Time = time - lastpack;
- _cost = 50000;
- ////////////////FUNCTION
- strike = {
- _pos = [_this select 0, _this select 1, 100];
- player setVariable[Z_moneyVariable, (_coins - _cost), true];
- titleText [format["you pay %1 coins",_cost] , "PLAIN DOWN", 1];
- TitleText [format["Alpha-Tango 0900"], "PLAIN DOWN"]; titleFadeOut 3;
- sleep 1;
- createVehicle ["SH_125_HE", _pos,[], 0, "NONE"];
- openMap [false, false];
- TitleText [format[""], "PLAIN DOWN"];
- _done = true;
- lastpack = time;
- };
- /////////////////////
- closedialog 0;
- sleep 0.5;
- if(_Time < _LastUsedTime) exitWith { // If cooldown is not done then exit script
- cutText [format["Mortar strike was launched %1 wait before try again!",(round(_Time - _LastUsedTime))], "PLAIN DOWN"]; //display text at bottom center of screen when players cooldown is not done
- };
- _coins = player getVariable [Z_moneyVariable,0];
- if (_coins < _cost) exitWith {
- cutText[format["You need %1 coins to call the strike",_cost], "PLAIN DOWN"];
- dayz_actionInProgress = false;
- };
- TitleText [format["Click on the map to strike"], "PLAIN DOWN"]; titleFadeOut 3;
- if(!(visibleMap)) then {
- openMap [true, false];
- };
- onMapSingleClick '[_pos select 0, _pos select 1, _pos select 2] call strike';
- waitUntil{_done};
- onMapSingleClick "";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement