Advertisement
AdamKadmon

Untitled

Mar 9th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.41 KB | None | 0 0
  1. private["_loadout", "_player"];
  2. _loadout = _this select 0;
  3. _player = _this select 1;
  4.  
  5. removeHeadgear _player;
  6. removeGoggles _player;
  7. removeVest _player;
  8. removeBackpack _player;
  9. removeUniform _player;
  10. removeAllWeapons _player;
  11. removeAllAssignedItems _player;
  12.  
  13. _uniformInfo = _loadout select 3;
  14. _uniform = _uniformInfo select 0;
  15. if !(_uniform isEqualTo "") then
  16. {
  17. _uniformItemArray = _uniformInfo select 1;
  18.  
  19. _player forceAddUniform _uniform;
  20.  
  21. {
  22. if((_x select 1) > 1) then
  23. {
  24. for "_i" from 1 to (_x select 1) do
  25. {
  26. _player addItemToUniform (_x select 0);
  27. };
  28. }
  29. else
  30. {
  31. _player addItemToUniform (_x select 0);
  32. };
  33. } forEach _uniformItemArray;
  34. };
  35.  
  36. _vestInfo = _loadout select 4;
  37. _vest = _vestInfo select 0;
  38. if !(_vest isEqualTo "") then
  39. {
  40. _vestItemArray = _vestInfo select 1;
  41.  
  42. _player addVest _vest;
  43.  
  44. {
  45. if((_x select 1) > 1) then
  46. {
  47. for "_i" from 1 to (_x select 1) do
  48. {
  49. _player addItemToVest (_x select 0);
  50. };
  51. }
  52. else
  53. {
  54. _player addItemToVest (_x select 0);
  55. };
  56. } forEach _vestItemArray;
  57. };
  58.  
  59. _bagInfo = _loadout select 5;
  60. _bag = _bagInfo select 0;
  61. if !(_bag isEqualTo "") then
  62. {
  63. _bagItemArray = _bagInfo select 1;
  64.  
  65. _player addBackpack _bag;
  66.  
  67. {
  68. if((_x select 1) > 1) then
  69. {
  70. for "_i" from 1 to (_x select 1) do
  71. {
  72. _player addItemToBackpack (_x select 0);
  73. };
  74. }
  75. else
  76. {
  77. _player addItemToBackpack (_x select 0);
  78. };
  79. } forEach _bagItemArray;
  80. };
  81.  
  82. _helmet = _loadout select 6;
  83. if !(_helmet isEqualTo "") then
  84. {
  85. _player addHeadgear _helmet;
  86. };
  87.  
  88. _faceWear = _loadout select 7;
  89. if !(_faceWear isEqualTo "") then
  90. {
  91. _player addItem _faceWear;
  92. _player assignItem _faceWear;
  93. };
  94.  
  95. _binocularinfo = _loadout select 8;
  96. if !(_binocularinfo isEqualTo []) then
  97. {
  98. _binocular = _binocularinfo select 0;
  99.  
  100. _player addWeapon _binocular;
  101.  
  102. {
  103. if(_x isEqualType []) then
  104. {
  105. _player addMagazine (_x select 0);
  106. }
  107. else
  108. {
  109. _player addWeapon _x;
  110. };
  111. } forEach _binocularinfo;
  112. };
  113.  
  114. _linkedItems = _loadout select 9;
  115. {
  116. if !(_x isEqualTo "") then
  117. {
  118. _player addItem _x;
  119. _player assignItem _x;
  120. };
  121. } forEach _linkedItems;
  122.  
  123.  
  124. _weaponsInfo = _loadout select 0;
  125. if !(_weaponsInfo isEqualTo []) then
  126. {
  127. _weapon = _weaponsInfo select 0;
  128.  
  129. _player addWeapon _weapon;
  130.  
  131. {
  132. if(_x isEqualType []) then
  133. {
  134. _player addMagazine (_x select 0);
  135. }
  136. else
  137. {
  138. _player addPrimaryWeaponItem _x;
  139. };
  140. } forEach _weaponsInfo;
  141. };
  142.  
  143. _launcherInfo = _loadout select 1;
  144. if !(_launcherInfo isEqualTo []) then
  145. {
  146. _launcher = _launcherInfo select 0;
  147. _launcherAmmo = _launcherInfo select 4;
  148.  
  149. _player addMagazine _launcherAmmo;
  150. _player addWeapon _launcher;
  151. };
  152.  
  153. _handGunInfo = _loadout select 2;
  154. if !(_handGunInfo isEqualTo []) then
  155. {
  156. _handGun = _handGunInfo select 0;
  157. _handGunAmmo = (_handGunInfo select 4) select 0;
  158. _player addMagazine _handGunAmmo;
  159. _player addWeapon _handGun;
  160. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement