Advertisement
sonixapache

Ammodrop script

Jan 13th, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.13 KB | None | 0 0
  1. /*
  2. Most of this script is Jester's AhoyWorld helicopter ammodrop script found on armaholic.
  3. Modified for generic ammodrop request by SonixApache.
  4. */
  5.  
  6.     //vars 'n shit
  7.     _chuteType =  "I_Parachute_02_F";   //parachute for blufor, for opfor and greenfor replace the 'B' with 'O' or 'G' respectively
  8.     _crateType =  "I_supplyCrate_F";    //ammocrate class for blufor, feel free to change to whichever box you desire
  9.     _smokeType =  "SmokeShellGreen";  //smoke shell color you want to use
  10.     _lightType =  "Chemlight_green";  //chemlightcolor you want used
  11.     _position = [21300,10350,500]; //position to drop shit, can be replaced with whatever
  12.  
  13.  
  14.         if (!isServer && isNull player) then {isJIP=true;} else {isJIP=false;};
  15.         // Wait until player is initialized
  16.        
  17.     if (!isDedicated) then
  18.     {
  19.         waitUntil {!isNull player && isPlayer player};
  20.     };
  21.  
  22.  
  23.     //Spawn chute, spawn crate, attach crate, slap a light on it
  24.     _chute = createVehicle [_chuteType, _position, [], 0, 'FLY'];
  25.     _crate = createVehicle [_crateType, position _chute, [], 0, 'NONE'];
  26.     _crate attachTo [_chute, [0, 0, -1.3]];
  27.     _crate allowdamage false;
  28.     _light = createVehicle [_lightType, position _chute, [], 0, 'NONE'];
  29.     _light attachTo [_chute, [0, 0, 0]];
  30.  
  31.     // clear crate
  32.     clearWeaponCargoGlobal _crate;
  33.     clearMagazineCargoGlobal _crate;
  34.     clearItemCargoGlobal _crate;
  35.     clearBackpackCargoGlobal _crate;
  36.        
  37.     // stuff in the crate
  38.     _crate addWeaponCargoGlobal ["rifle_FAL", 16];
  39.     _crate addMagazineCargoGlobal ["20Rnd_762x51_Mag", 40];
  40.     _crate addWeaponCargoGlobal ["hgun_Pistol_heavy_02_F", 16];
  41.     _crate addMagazineCargoGlobal ["6Rnd_45ACP_Cylinder", 48];
  42.     _crate addItemCargoGlobal ["V_mas_afr_TacVest_i", 16];
  43.     _crate addItemCargoGlobal ["H_HelmetB_black", 16];
  44.     _crate addItemCargoGlobal ["U_IG_Guerilla1_1", 4];
  45.     _crate addItemCargoGlobal ["U_O_Wetsuit", 4];
  46.    
  47.     // Ditch the crate once it hits the floor, drop a smoke.
  48.     waitUntil {position _crate select 2 < 1 || isNull _chute};
  49.     detach _crate;
  50.     _crate setPos [position _crate select 0, position _crate select 1, 0];
  51.     _smoke = _smokeType createVehicle [getPos _crate select 0, getPos _crate select 1,5];
  52.     _crate allowdamage true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement