Advertisement
InnovativeStudios

fn_spawnExplosive.sqf

Apr 30th, 2022
2,088
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 0.67 KB | None | 0 0
  1. /*
  2.     filename: @fn_spawnExplosive.sqf
  3.     Author: J. Schmidt
  4.     Coded for SOG Missions and Campaigns
  5.  
  6. */
  7.  
  8. params ["_time", ["_explosives", []]];
  9.  
  10. while {(_time > 0) && { alive _x } count _explosives > 0} do {
  11.     _time = _time - 1;
  12.     sleep 1;
  13.  
  14.     hintSilent parseText format ["<t size='1' color='#ffffff' shadow='2'>Time Left: </t><t size='1.125' color='#ff0000' shadow='2'>%1</t>", _time];
  15.  
  16.     if ({ alive _x } count _explosives <= 0) exitWith {};
  17.  
  18.     {
  19.         if (alive _x) then {
  20.             _x say3D "jas92_timerClick";
  21.         };
  22.     } forEach _explosives;
  23.  
  24.     if (_time <= 0 && { alive _x } count _explosives > 0) exitWith {
  25.         { _x setDamage 1; } forEach _explosives;
  26.     };
  27. };
  28.  
  29. hint "";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement