Advertisement
hurburd

Untitled

May 17th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. // rickB´s contamination Zone script - playable units not wearing proper Gasmasks (M50 and M40´s - from HiddenIdentity Pack II) receive damage every 10 seconds
  2. // put this in invisible helipad (found in editor under signs) to be center of desired contamiationzone: null = [this, 100, 80, 10] execVM "rick_survival\rick_contamination.sqf"
  3. // playableunits being inside the contamiation zone (this) (inside radius 100m and under height 80m) will receive damage every 10 seconds
  4. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  5.  
  6. if (isserver OR isdedicated) then {
  7.  
  8. _contaminationcenter = _this select 0;
  9. _conrad = _this select 1;
  10. _height = _this select 2;
  11. _time = _this select 3;
  12.  
  13. //wait until unit inside contaminated zone
  14.  
  15. waituntil {({(_contaminationcenter distance _x) < _conrad AND getposATL _x select 2 < _height } count switchableUnits) > 0 OR ({(_contaminationcenter distance _x) < _conrad AND getposATL _x select 2 < _height} count playableUnits) > 0};
  16.  
  17. _allplayers = switchableunits + playableunits;
  18.  
  19. {_allplayers = switchableunits + playableunits; if (_x distance _contaminationcenter < _conrad AND goggles _x != "Mask_M50" AND goggles _x != "Mask_M40" AND goggles _x != "Mask_M40_OD" AND getposATL _x select 2 < 80) then {hint format ["_%1, you should wear a gasmask here!",_x]; _x setdammage ((getdammage _x)+0.2)} } foreach _allplayers;
  20.  
  21.  
  22. sleep _time;
  23.  
  24. null = [_contaminationcenter,_conrad, _height, _time] execVM "rick_survival\rick_contamination.sqf";
  25.  
  26.  
  27. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement