Advertisement
Guest User

Untitled

a guest
May 25th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. //----------------------------------------------------------//
  2. // Right Click Options
  3. ["PipeBomb","Suicide Bomb","execVM 'dayz_code\actions\player_suicidebomb.sqf';","true"],
  4.  
  5.  
  6.  
  7. //----------------------------------------------------------//
  8. //Script Name: player_suicidebomb.sqf
  9.  
  10. private ["_req","_rdy","_tmr","_bt","_msg","_done","_bomb"];
  11. disableSerialization;
  12. if (dayz_actionInProgress) exitWith {"Hang on still preparing the bomb" call dayz_rollingMessages;};
  13. if(!(isNull findDisplay 106)) then {findDisplay 106 closeDisplay 0};
  14. dayz_actionInProgress = true; _done = false;
  15. //--------------------------------------------------------// Config!
  16. _req = "PipeBomb" in magazines player;
  17. _rdy = false;
  18. _tmr = false;
  19. _bt = 10;
  20. _msg = "Detonation %1 seconds";
  21. //--------------------------------------------------------// Config End
  22. if (isInTraderCity) exitWith {
  23. cutText [format["Not Allowed Near Traders!"], "PLAIN DOWN"];
  24. _rdy = false;
  25. dayz_actionInProgress = false;
  26. };
  27.  
  28. if (!_req) exitWith {
  29. cutText [format["Satchel Charge Needed!"], "PLAIN DOWN"];
  30. _rdy = false;
  31. dayz_actionInProgress = false;
  32. };
  33.  
  34. if ((_req) && (!isInTraderCity )) then {
  35. _rdy = true;
  36. };
  37. //--------------------------------------------------------//
  38. fn_cntdwn = {
  39. while{!_done} do {
  40. if(_bt > 0) then {
  41. format[_Msg,_bt] call dayz_rollingMessages;
  42. sleep 1;
  43. _bt = _bt - 1;
  44. _done = _bt <= 0;
  45. };
  46. };
  47. };
  48.  
  49. fn_bombexp = {
  50. _bomb = "R_SMAW_HEDP" createVehicle (getPos player);
  51. _bomb setPosATL getPosATL player;
  52. player removeMagazine "PipeBomb";
  53. Sleep 2;
  54. format["You will be rewarded with 72 Virgins"] call dayz_rollingMessages;
  55. player setDamage 1;
  56. [player ,"suicide"]
  57. };
  58. //--------------------------------------------------------//
  59. if (_rdy) then {
  60. [format["<t size='1.2' color='#00EEFF'>Suicide Bomb Activated</t>"],0,0,2,2] spawn BIS_fnc_dynamicText;
  61. call fn_cntdwn;
  62. Sleep _bt;
  63. call fn_bombexp;
  64. };
  65.  
  66. dayz_actionInProgress = false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement