Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. if(isServer)then{
  2. _pos= (_this select 0);
  3. _pos0= (_pos select 0);
  4. _pos1= (_pos select 1);
  5. _pos2= (_pos select 2);
  6. _showLoot= (_this select 1);
  7.  
  8. _BARREL = createVehicle ["Land_BarrelEmpty_F",[_pos0,_pos1,_pos2+0.1], [], 0, "can_Collide"];
  9. sleep 0.5;
  10. _holder = createVehicle ["groundweaponholder",[_pos0,_pos1,(getposATL _BARREL select 2)], [], 0, "can_Collide"];
  11. deletevehicle _BARREL;
  12.  
  13. _type=floor (random 5);
  14.  
  15. if (_showLoot)
  16. then {
  17. _id=format ["%1",_pos];
  18. _debug=createMarker [_id,GETPOS _holder];
  19. _debug setMarkerShape "ICON";
  20. _debug setMarkerType "hd_dot";
  21. _debug setMarkerColor "ColorRed";
  22. _txt=format ["%1",_type];
  23. _debug setMarkerText _txt;
  24. };
  25.  
  26. // Spawn Weapon
  27. if (_type == 0)
  28. then {
  29. _weapon= weaponsLoot call bis_fnc_selectRandom;
  30.  
  31. _magazines = getArray (configFile / "CfgWeapons" / _weapon / "magazines");
  32. _magazineClass = _magazines call bis_fnc_selectRandom;
  33.  
  34. _holder addWeaponCargoGlobal [_weapon, 1];
  35. _holder addMagazineCargoGlobal [_magazineClass, 2];
  36. };
  37.  
  38.  
  39. // Spawn Magazines
  40. if (_type == 1)
  41. then {
  42. _weapon= weaponsLoot call bis_fnc_selectRandom;
  43. _magazines = getArray (configFile / "CfgWeapons" / _weapon / "magazines");
  44. _magazineClass = _magazines call bis_fnc_selectRandom;
  45.  
  46. _holder addMagazineCargoGlobal [_magazineClass, 2];
  47. };
  48.  
  49.  
  50. // Spawn Items
  51. if (_type == 2)
  52. then {
  53. _item= itemsLoot call bis_fnc_selectRandom;
  54. _holder addItemCargoGlobal [_item, 1];
  55.  
  56. _clothing= clothesLoot call bis_fnc_selectRandom;
  57. _holder addItemCargoGlobal [_clothing, 1];
  58. };
  59.  
  60.  
  61. // Spawn Vests
  62. if (_type == 3)
  63. then {
  64. _vest= vestsLoot call bis_fnc_selectRandom;
  65. _holder addItemCargoGlobal [_vest, 1];
  66. };
  67.  
  68.  
  69. // Spawn Backpacks
  70. if (_type == 4)
  71. then {
  72. _backpack= backpacksLoot call bis_fnc_selectRandom;
  73. _holder addBackpackCargoGlobal [_backpack, 1];
  74. };
  75. };//IsServer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement