Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //----------------------------------------------------------//
- // Right Click Options
- ["PipeBomb","Suicide Bomb","execVM 'dayz_code\actions\player_suicidebomb.sqf';","true"],
- //----------------------------------------------------------//
- //Script Name: player_suicidebomb.sqf
- private ["_req","_rdy","_tmr","_bt","_msg","_done","_bomb"];
- disableSerialization;
- if (dayz_actionInProgress) exitWith {"Hang on still preparing the bomb" call dayz_rollingMessages;};
- if(!(isNull findDisplay 106)) then {findDisplay 106 closeDisplay 0};
- dayz_actionInProgress = true; _done = false;
- //--------------------------------------------------------// Config!
- _req = "PipeBomb" in magazines player;
- _rdy = false;
- _tmr = false;
- _bt = 10;
- _msg = "Detonation %1 seconds";
- //--------------------------------------------------------// Config End
- if (isInTraderCity) exitWith {
- cutText [format["Not Allowed Near Traders!"], "PLAIN DOWN"];
- _rdy = false;
- dayz_actionInProgress = false;
- };
- if (!_req) exitWith {
- cutText [format["Satchel Charge Needed!"], "PLAIN DOWN"];
- _rdy = false;
- dayz_actionInProgress = false;
- };
- if ((_req) && (!isInTraderCity )) then {
- _rdy = true;
- };
- //--------------------------------------------------------//
- fn_cntdwn = {
- while{!_done} do {
- if(_bt > 0) then {
- format[_Msg,_bt] call dayz_rollingMessages;
- sleep 1;
- _bt = _bt - 1;
- _done = _bt <= 0;
- };
- };
- };
- fn_bombexp = {
- _bomb = "R_SMAW_HEDP" createVehicle (getPos player);
- _bomb setPosATL getPosATL player;
- player removeMagazine "PipeBomb";
- Sleep 2;
- format["You will be rewarded with 72 Virgins"] call dayz_rollingMessages;
- player setDamage 1;
- [player ,"suicide"]
- };
- //--------------------------------------------------------//
- if (_rdy) then {
- [format["<t size='1.2' color='#00EEFF'>Suicide Bomb Activated</t>"],0,0,2,2] spawn BIS_fnc_dynamicText;
- call fn_cntdwn;
- Sleep _bt;
- call fn_bombexp;
- };
- dayz_actionInProgress = false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement