Advertisement
Guest User

Untitled

a guest
Nov 24th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.85 KB | None | 0 0
  1.  
  2.  
  3. private ["_mypos","_dir","_crate","_inVehicle","_flypos","_msg","_lootOption","_loot_lists","_loot"];
  4.  
  5.  
  6. _inVehicle = (vehicle player != player);
  7. if (_inVehicle) exitWith {systemchat "<PREVENTION>:Cannot Do it in vehicles";};
  8. _flypos = ((getPosATL (vehicle player)) select 2);
  9.  
  10. if (_flypos > 3) exitWith {systemchat "<PREVENTION>:you must be in the ground";}; //Prevention for HALO SPAWNS since i notice that youre runnig ESSV3
  11.  
  12.  
  13. player removeAction s_player_box;
  14. s_player_box -1;
  15.  
  16. [-7,0] call player_humanityChange;
  17. call player_forceSave;
  18. //=========USER CONFIG============\\
  19. _lootOption = 0; //1 randomize loot //0 allways same loot
  20. _msg = 0; //0 uses hint //1 uses systemchat
  21. _crateType = "USOrdnanceBox_EP1";
  22. //=========USER CONFIG============\\
  23.  
  24.  
  25.  
  26. if (_msg != 1) then {hint "<SERVER>:GIFT FOR NEW PLAYERS";}else{systemchat ">SERVER<: GIFT FOR FRESH SPAWNS";};
  27.  
  28. _mypos = getposATL player;
  29. _dir = getdir player;
  30. _mypos = [(_mypos select 0)+2*sin(_dir),(_mypos select 1)+2*cos(_dir), (_mypos select 2)];
  31. _crate = createVehicle [_crateType,_mypos,[], 0, "CAN_COLLIDE"];
  32. _crate setDir _dir;
  33. _crate setposATL _mypos;
  34.  
  35. clearWeaponCargoGlobal _crate;
  36. clearMagazineCargoGlobal _crate;
  37. clearBackpackCargoGlobal _crate;
  38.  
  39. //////FILL THE CRATE
  40.  
  41.  
  42. if (_lootOption !=1) then {
  43. //=============================IF URE USING _lootOption = 0; customize below the loot==========\\
  44. //weapons && tools below
  45. /*
  46. _crate addWeaponCargoGlobal ["ItemToolbox", 2];
  47. _crate addWeaponCargoGlobal ["ItemEtool", 2];
  48. _crate addWeaponCargoGlobal ["ItemCompass", 2];
  49. _crate addWeaponCargoGlobal ["Binocular", 2];
  50. */
  51. // items below
  52. _crate addMagazineCargoGlobal ["plot_pole_kit", 1];
  53. _crate addMagazineCargoGlobal ["ItemLockBox", 1];
  54. _crate addMagazineCargoGlobal ["ItemRuby", 1];
  55. //=============================IF URE USING _lootOption = 0; customize above the loot==========\\
  56. }else{
  57.  
  58.  
  59. //=============================IF URE USING _lootOption = 1; customize below the loot==========\\
  60. _loot_lists = [
  61. [
  62. ["ChainSawR","ItemSledge","ItemPickaxe"],
  63. ["CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","PartGeneric"]
  64. ],
  65. [
  66. ["ItemKeyKit"],
  67. ["ItemAntibiotic","ItemBandage","equip_herb_box","ItemGoldBar10oz"]
  68. ],
  69. [
  70. ["ItemHatchet","ItemMachete","ItemPickaxe","ItemSledge"],
  71. ["ItemRuby","ItemMixOil","plot_pole_kit"]
  72. ],
  73. [
  74. ["ChainSaw"],
  75. ["ItemDesertTent","ItemGenerator","equip_brick"]
  76. ],
  77. [
  78. ["MP5_DZ"],
  79. ["ItemComboLock","ItemVault","ItemLockBox"]
  80. ]
  81. ];
  82. //=============================IF URE USING _lootOption = 1; customize above the loot==========\\
  83. _loot = _loot_lists call BIS_fnc_selectRandom;
  84. {
  85. _crate addWeaponCargoGlobal [_x,1];
  86. } forEach (_loot select 0);
  87. {
  88. _crate addMagazineCargoGlobal [_x,1];
  89. } forEach (_loot select 1);
  90. };
  91. waitUntil {(player distance _crate) > 20};
  92. deleteVehicle _crate;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement