Advertisement
AdamKadmon

Untitled

Jan 30th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.22 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. _otherItems = (_loadout select 9);
  96. if !(_otherItems isEqualTo []) then
  97. {
  98. _otherItems = _otherItems select 0;
  99. _player addItem _otherItems;
  100. _player assignItem _otherItems;
  101. };
  102.  
  103. _linkedItems = _loadout select 9;
  104. {
  105. if !(_x isEqualTo "") then
  106. {
  107. _player addItem _x;
  108. _player assignItem _x;
  109. };
  110. } forEach _linkedItems;
  111.  
  112.  
  113. _weaponsInfo = _loadout select 0;
  114. if !(_weaponsInfo isEqualTo []) then
  115. {
  116. _weapon = _weaponsInfo select 0;
  117.  
  118. _player addWeapon _weapon;
  119.  
  120. {
  121. if(_x isEqualType []) then
  122. {
  123. _player addMagazine (_x select 0);
  124. }
  125. else
  126. {
  127. _player addPrimaryWeaponItem _x;
  128. };
  129. } forEach _weaponsInfo;
  130. };
  131.  
  132. _launcherInfo = _loadout select 1;
  133. if !(_launcherInfo isEqualTo []) then
  134. {
  135. _launcher = _launcherInfo select 0;
  136. _launcherAmmo = _launcherInfo select 4;
  137.  
  138. _player addMagazine _launcherAmmo;
  139. _player addWeapon _launcher;
  140. };
  141.  
  142. _handGunInfo = _loadout select 2;
  143. if !(_handGunInfo isEqualTo []) then
  144. {
  145. _handGun = _handGunInfo select 0;
  146. _handGunAmmo = (_handGunInfo select 4) select 0;
  147. _player addMagazine _handGunAmmo;
  148. _player addWeapon _handGun;
  149. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement