Advertisement
Guest User

Untitled

a guest
Jun 13th, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. /**
  2. * ExileServer_util_fill_fillWeapons
  3. *
  4. * Exile Mod
  5. * www.exilemod.com
  6. * © 2015 Exile Mod Team
  7. *
  8. * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
  9. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
  10. */
  11.  
  12. private["_object", "_weapons", "_i", "_thing"];
  13. _object = _this select 0;
  14. _weapons = _this select 1;
  15. if ((typeName _weapons) isEqualTo "ARRAY") then
  16. {
  17. if!(_weapons isEqualTo [])then
  18. {
  19. {
  20. _object addWeaponCargoGlobal [_x select 0, 1];
  21. for "_i" from 1 to ((count _x) -1) do
  22. {
  23. _thing = _x select _i;
  24. if !(_thing isEqualTo "") then
  25. {
  26. if ((typeName _thing) isEqualTo "ARRAY") then
  27. {
  28. if !(_thing isEqualTo []) then
  29. {
  30. _object addMagazineAmmoCargo [_thing select 0, 1, _thing select 1];
  31. };
  32. }
  33. else
  34. {
  35. _object addItemCargoGlobal [_thing, 1];
  36. };
  37. };
  38. };
  39. }
  40. forEach _weapons;
  41. };
  42. };
  43. true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement