SHARE
TWEET

Roque_THE_GAMER's code

a guest Sep 20th, 2019 110 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //win check
  2. ["WinConditionCheck", "onEachFrame", {
  3.     //delete the agents when they come
  4.     _agentsToDelete = (entities [[
  5.         "C_Man_casual_1_F_tanoan",
  6.         "C_Man_casual_2_F_tanoan",
  7.         "C_Man_casual_3_F_tanoan",
  8.         "C_man_sport_1_F_tanoan",
  9.         "C_man_sport_2_F_tanoan",
  10.         "C_man_sport_3_F_tanoan",
  11.         "C_Man_casual_4_F_tanoan",
  12.         "C_Man_casual_5_F_tanoan",
  13.         "C_Man_casual_6_F_tanoan"
  14.         ], [], true, true]) inAreaArray [(getpos ccp), 20, 20, 0, false, 20];
  15.  
  16.     if (count _agentsToDelete > 0) then {
  17.  
  18.         {
  19.         {[_x,""] remoteExec ["switchmove",0]} forEach ((allPlayers inAreaArray [(getpos _x), 3, 3, 0, false, 3]) select {(((animationState _x) find "acinpercm") == 0) or (((animationState _x) find "acinpknlm") == 0)});
  20.             myAgents = myAgents - 1;
  21.             intelCacheAmout = intelCacheAmout + 15;
  22.             [(name _x),"SUCCEEDED",false] call BIS_fnc_taskSetState;
  23.             _WoundedPlaces = (synchronizedObjects Bodybags);
  24.             _WoundedPlaces sort true;
  25.             _weretoputwounded = (_WoundedPlaces select 0);
  26.             [_weretoputwounded,_x] call CreateWondedCivilianAgent;
  27.             ["Civil resgatado"] remoteexec ["systemchat",0];
  28.             if (myAgents == 0) then {
  29.             ["RecueCivs","SUCCEEDED"] call BIS_fnc_taskSetState;
  30.             };
  31.             moveOut _x;  
  32.             deleteVehicle _x;
  33.         } forEach _agentsToDelete;  
  34.     };
  35.     if (intelCacheAmout >= 100) then {
  36.     [true,["CacheLocated","KillCache"],["Cache localizado pelos civis!","Localização do Cache",""],MyCache,"created",2,false,"assigned",true] call BIS_fnc_taskCreate;
  37.     {[_x,(getpos MyCache)] spawn SelectWaypointInfantry} foreach (allgroups select {side _x == east});
  38.     intelCacheAmout = 0;
  39.     };
  40.     //win gg
  41.     if (time > 30 and (!alive MyCache)) then {
  42.     [] spawn SeverSetplayersPos;
  43.     ["ClearArea","SUCCEEDED"] call BIS_fnc_taskSetState;
  44.     ["WinConditionCheck", "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
  45.     };
  46. }] call BIS_fnc_addStackedEventHandler;
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