Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.09 KB | None | 0 0
  1. /*  SYNTAX:    
  2.                     autor - Sharley
  3.                     null = [_unit, _obj, _obj_rad, _damage, _mask] execVM "skrypty/radiation.sqf" execVM "skrypty\radiation.sqf - wywołanie + wzór
  4.                     _unit - jednostka
  5.                     _obj - obiekt odpowiedzialny za radiacje
  6.                     _obj_rad - obszar radiacji
  7.                     _damage - obrazenia od radiacji
  8.                     _mask - hełm odpowiedzialny za ochronę przed radiacją       
  9.  
  10.                     Przykład:
  11.                     null = [player, car1, 50, 0.10, "rhsusf_hgu56p_mask_green"] execVM "skrypty\radiation.sqf"
  12. */
  13.  
  14. _unit = _this select 0;        
  15. _obj = _this select 1;
  16. _obj_rad = _this select 2;
  17. _damage = _this select 3;
  18. _mask = _this select 4;
  19.  
  20. no_mask = false;
  21.  
  22. while {alive _unit} do
  23. {                  
  24.         if (_unit distance _obj < _obj_rad) then { 
  25.             playsound "geiger";    
  26.             if (headgear _unit == _mask) then {
  27.                 hint "Masz maske";
  28.                 playsound "breath";
  29.             } else {
  30.                 hint "Nie masz maski"; 
  31.                 no_mask = true;
  32.             }; 
  33.         if (no_mask) then {
  34.           [_unit, _damage, (selectRandom ["Head","body","hand_l","hand_r","leg_l","leg_r"]), "stab"] call ace_medical_fnc_addDamageToUnit;
  35.         }; 
  36.     };
  37.     sleep 2;
  38. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement