SHARE
TWEET

Untitled

a guest Aug 26th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. _vehicles = [Ajoneuvo_15, Ajoneuvo_14, Ajoneuvo_13, Ajoneuvo_12, Ajoneuvo_11, Ajoneuvo_10, Ajoneuvo_9, Ajoneuvo_8, Ajoneuvo_7, Ajoneuvo_6, Ajoneuvo_5, Ajoneuvo_4, Ajoneuvo_3, Ajoneuvo_2, Ajoneuvo_1];
  2. _soldiers = allUnits;
  3. _random_s = []; _rr = [];
  4.  
  5. for [{_i = 0}, {_i < ((count _soldiers))}, {_i = _i + 1}] do {
  6.     _rk = "RK" in str((_soldiers select _i));
  7.     if(_rk) then {
  8.         _rr = _rr + [_soldiers select _i];
  9.     };
  10. };
  11.  
  12. _random_s = [_rr, {floor (random (count _rr))} ] call fn_vbs_sortArray;
  13.  
  14.  
  15. for [{_i = 0}, {_i < ((count _random_s))}, {_i = _i + 1}] do {
  16.     _rk = "RK" in str((_random_s select _i));
  17.     if(_rk) then {
  18.         if(isPlayer (_random_s select _i) || !isMultiplayer) then {
  19.             if(_i < 15) then {
  20.                 (_random_s select _i) moveInDriver (_vehicles select _i);
  21.             } else {
  22.                 (_random_s select _i) moveInCargo (_vehicles select _i-15);
  23.             };
  24.         };
  25.     };
  26. };
  27.  
  28. while {true} do {
  29.     for [{_i = 0}, {_i < ((count _vehicles) - 1)}, {_i = _i + 1}] do {
  30.         if ((alive (_vehicles select _i)) && (alive (_vehicles select (_i + 1)))) then {
  31.             if ((speed (_vehicles select _i) > 5) &&
  32.                 (speed (_vehicles select (_i + 1)) > 5) &&
  33.                 (([getPos (_vehicles select _i), getPos (_vehicles select (_i + 1))] call fn_vbs_distance2Dsqr) < 625)) then {
  34.                     (_vehicles select _i) setDamage 1;
  35.             };
  36.         };
  37.     };
  38.     for [{_i = 0}, {_i < ((count _vehicles))}, {_i = _i + 1}] do {
  39.         if ((alive (_vehicles select _i))) then {
  40.             if ((!(isOnRoad getPos (_vehicles select _i)))) then {
  41.                     (_vehicles select _i) setDamage 1;
  42.             };
  43.         };
  44.     };
  45.     sleep 1;
  46. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top