Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* SYNTAX:
- autor - Sharley
- null = [_unit, _obj, _obj_rad, _damage, _mask] execVM "skrypty/radiation.sqf" execVM "skrypty\radiation.sqf - wywołanie + wzór
- _unit - jednostka
- _obj - obiekt odpowiedzialny za radiacje
- _obj_rad - obszar radiacji
- _damage - obrazenia od radiacji
- _mask - hełm odpowiedzialny za ochronę przed radiacją
- Przykład:
- null = [player, car1, 50, 0.10, "rhsusf_hgu56p_mask_green"] execVM "skrypty\radiation.sqf"
- */
- _unit = _this select 0;
- _obj = _this select 1;
- _obj_rad = _this select 2;
- _damage = _this select 3;
- _mask = _this select 4;
- no_mask = false;
- while {alive _unit} do
- {
- if (_unit distance _obj < _obj_rad) then {
- playsound "geiger";
- if (headgear _unit == _mask) then {
- hint "Masz maske";
- playsound "breath";
- } else {
- hint "Nie masz maski";
- no_mask = true;
- };
- if (no_mask) then {
- [_unit, _damage, (selectRandom ["Head","body","hand_l","hand_r","leg_l","leg_r"]), "stab"] call ace_medical_fnc_addDamageToUnit;
- };
- };
- sleep 2;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement