Advertisement
Guest User

Untitled

a guest
Jun 17th, 2013
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.35 KB | None | 0 0
  1. clearHouses = {
  2. private ["_house","_cleared","_houses","_gMkr"];
  3.  
  4. _gMkr = str(player call getGridPos);
  5. if (markerColor _gMkr == "ColorRed") then {
  6. _houses = [getPosATL player, 8, 3, false] call findHouses;
  7. if (count _houses > 0) then {
  8. _house = _houses select 0;
  9. _cleared = _house getVariable "cleared";
  10. if (isNil "_cleared") then {
  11. if (nearestEastMen(getPosATL _house, 10, true, "count") == 0) then {
  12. _house setVariable ["cleared", true];
  13. };
  14. };
  15. };
  16. };
  17. };
  18.  
  19. casePickup = {
  20. private ["_cases","_case","_cache"];
  21.  
  22. if (_Block < 10) exitWith { _Block = _Block + 1; };
  23. _cases = nearestObjects[getPosATL player,["suitcase"], 3];
  24. if (count _cases == 0) exitWith {};
  25. _case = _cases select 0;
  26. if isNull _case exitWith {};
  27. _Block = 0;
  28. deleteVehicle _case;
  29. player groupChat "you retrieved some intel on the location of an ammo cache";
  30. _cache = nearestObjects[getPosATL player, [cacheType], AORADIUS] select 0;
  31. if (isNil "_cache") exitWith { hint "Currently, there is no intel on caches within your AO. Time to move on and look elsewhere!"; };
  32. [nil,nil,rSPAWN,_cache,{
  33. if (isServer) then { _this call createIntel; };
  34. hint "New intel received on the location of an ammo cache. A marker has been added to the map.";
  35. }] call RE;
  36. };
  37.  
  38. firedEH = {
  39. if ((_this select 1) == ATTYPE) then { [] spawn { sleep 0.5; player removeWeapon ATTYPE; }; };
  40. if (captive player) then { [nil,player, rSETCAPTIVE, false] call RE; };
  41. };
  42.  
  43. oneShotM136 = {
  44. if (currentWeapon player == ATTYPE && !(ATMAGTYPE in magazines player)) then {
  45. player removeWeapon ATTYPE;
  46. player addMagazine ATMAGTYPE;
  47. player addWeapon ATTYPE;
  48. player selectWeapon ATTYPE;
  49. };
  50. if (currentWeapon player != ATTYPE && ATMAGTYPE in magazines player) then { player removeMagazine ATMAGTYPE; };
  51. };
  52.  
  53. nameStrings = {
  54. private ["_id","_name","_plr"];
  55. {
  56. _id = westPlayerStrings find _x;
  57. if !isNil _x then {
  58. _plr = call compile _x;
  59. if (!isNull _plr && isPlayer _plr) then {
  60. if alive _plr then {
  61. if (playerNames select _id == "Error: No unit") exitWith {};
  62. _name = name _plr;
  63. if (playerNames select _id != _name) then { playerNames set[_id, _name]; };
  64. };
  65. } else {
  66. if (playerNames select _id != "") then { playerNames set[_id, ""]; };
  67. };
  68. } else {
  69. if (playerNames select _id != "") then { playerNames set[_id, ""]; };
  70. };
  71. } forEach westPlayerStrings;
  72. };
  73.  
  74. vclisFull = {
  75. if (_this isKindOf "man" || _this isKindOf "building") exitWith { false };
  76. if (_this emptyPositions "Driver" > 0) exitWith { false };
  77. if (_this emptyPositions "Gunner" > 0)exitWith { false };
  78. if (_this emptyPositions "Commander" > 0) exitWith { false };
  79. if (_this emptyPositions "Cargo" > 0) exitWith { false };
  80. true
  81. };
  82.  
  83. moveInVehicle = {
  84. private ["_id"];
  85.  
  86. if (_this emptyPositions "Driver" > 0) exitWith { player action["getInDriver", _this]; };
  87. if (_this emptyPositions "Gunner" > 0) exitWith { player action["getInTurret", _this, [0]]; };
  88. if (_this emptyPositions "Commander" > 0) exitWith { player action["getInCommander", _this]; };
  89. if (_this emptyPositions "Cargo" > 0) exitWith {
  90. _id = count (crew _this - [driver _this] - [gunner _this] - [commander _this]);
  91. player action["getInCargo", _this, _id];
  92. };
  93. };
  94.  
  95. crewToStr = {
  96. private ["_pos","_str","_man","_num","_vcl"];
  97.  
  98. _num = count _this - 1;
  99. _vcl = vehicle (_this select 0);
  100. _str = "";
  101. for "_j" from 0 to (_num) do {
  102. _man = _this select _j;
  103. if (alive _man && str _man in westPlayerStrings) then {
  104. _str = _str + getName(_man);
  105. _pos = " (Cargo)";
  106. if (driver _vcl == _man) then { _pos = " (Driver)"; };
  107. if (_vcl turretUnit [0] == _man) then { _pos = " (Turret)"; };
  108. if (_vcl turretUnit [1] == _man) then { _pos = " (Front Gunner)"; };
  109. _str = _str + _pos;
  110. if (_j < _num) then { _str = _str + "<br/>"; };
  111. };
  112. };
  113. _str
  114. };
  115.  
  116. equals = {
  117. private ["_bool","_arr1","_arr2"];
  118.  
  119. _arr1 = _this select 0;
  120. _arr2 = _this select 1;
  121. _bool = true;
  122. if (count _arr1 != count _arr2) exitWith { false};
  123. for "_i" from 0 to (count _arr1 - 1) do {
  124. if (!((_arr1 select _i) in _arr2)) exitWith { _bool = false; };
  125. if (!((_arr2 select _i) in _arr1)) exitWith { _bool = false; };
  126. };
  127. _bool
  128. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement