Results 1 to 2 of 2
  1. #1
    T0X1Cmods's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Location
    Arma3.exe
    Posts
    310
    Reputation
    10
    Thanks
    3,453

    Weapon Crate Script

    Code:
    // Written By Bush Wookie 12/03/2013 10:28 GMT+0
    _dir = getdir vehicle player;
    _pos = getPos vehicle player;
    _pos = [(_pos select 0)+1.5*sin(_dir),(_pos select 1)+1.5*cos(_dir),0];
    _box = createVehicle ["box_NATO_AMMO_F", _pos, [], 0, 'CAN_COLLIDE']; //Change box_NATO_AMMO_F to what ever type of weapon box you want
    
    clearWeaponCargo _box;
    clearMagazineCargo _box;
    clearItemCargo _box;
    clearBackpackCargo _box;
    
    _cfgweapons = configFile >> "CfgWeapons";
    _weapons = [];
    for "_i" from 0 to (count _cfgWeapons)-1 do
    {
    _cur_wep = _cfgweapons select _i;
    			
    	if(isClass _cur_wep) then
    	{
    		_classname = configName _cur_wep;
    		_wep_type = getNumber(_cur_wep >> "type");
    		_scope = getNumber(_cur_wep >> "scope");
    		_picture = getText(_cur_wep >> "picture");
    		if(_scope >= 2 && _wep_type in [1,2,4,4096] && _picture != "" && !(_classname in _weapons) && _classname != "NVGoggles") then
    		{
    			_weapons set[count _weapons, _classname];
    		};
    	};
    };
    		
    _cfgweapons = configFile >> "CfgMagazines";
    _magazines = [];
    		
    for "_i" from 0 to (count _cfgWeapons)-1 do
    {
    _cur_wep = _cfgweapons select _i;
    			
    	if(isClass _cur_wep) then
    	{
    		_classname = configName _cur_wep;
    		_scope = getNumber(_cur_wep >> "scope");
    		_picture = getText(_cur_wep >> "picture");
    		if(_scope >= 2 && _picture != "" && !(_classname in _magazines)) then
    		{
    			_magazines set[count _magazines, _classname];
    		};
    	};
    };
    		
    { _box addWeaponCargo [_x,50]; } foreach _weapons; //Change 50 to the amount of each weapon you want
    { _box addMagazineCargo [_x,50]; }foreach _magazines; //Change 50 to the amount of each mag you want
    	
    _cfgweapons = configFile >> "CfgWeapons";
    _items = [];
    		
    for "_i" from 0 to (count _cfgWeapons)-1 do
    {
    _cur_wep = _cfgweapons select _i;
    			
    	if(isClass _cur_wep) then
    	{
    		_classname = configName _cur_wep;
    		_wep_type = getNumber(_cur_wep >> "type");
    		_scope = getNumber(_cur_wep >> "scope");
    		_picture = getText(_cur_wep >> "picture");
    		if(_scope >= 2 && _wep_type in [131072,4096] && _picture != "" && !(_classname in _items) && _classname != "Binocular") then
    		{
    			_items set[count _items, _classname];
    		};
    	};
    };
    		
    { _box addItemCargo [_x,50]; } foreach _items; //change 50 to the amount of each item you want
    		
    _cfgweapons = configFile >> "CfgVehicles";
    _backpacks = [];
    		
    for "_i" from 0 to (count _cfgWeapons)-1 do
    {
    _cur_wep = _cfgweapons select _i;
    			
    	if(isClass _cur_wep) then
    	{
    		_classname = configName _cur_wep;
    		_wep_type = getText(_cur_wep >> "vehicleClass");
    		_scope = getNumber(_cur_wep >> "scope");
    		_picture = getText(_cur_wep >> "picture");
    		if(_scope >= 2 && _wep_type == "Backpacks" && _picture != "" && !(_classname in _backpacks)) then
    		{
    			_backpacks set[count _backpacks, _classname];
    		};
    	};
    };
    		
    { _box addBackPackCargo [_x,5]; } foreach _backpacks; // change 5 to the amount of each backpack you want
    Save as a .sqf file and then execute it
    __________________________________________________
    Computer Specifications.
    CPU: i7 4770k Haswell 4.6Ghz (Cooled by H100i Push pull (2x NZXT FS 200LED Pull and Noctua NF-F12 Push))
    RAM: Corsair Dominator Platinum 1866 Mhz 16GB 2x 8GB
    Motherboard: ASUS ROG Maximus 6 Hero
    Video Card: Zotac GTX 780

    __________________________________________________



  2. #2
    MillerLite's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Posts
    70
    Reputation
    10
    Thanks
    593
    I'm sorry but this is pretty much complete copy pasta, and it still doesnt have clothing or first aid kits.

Similar Threads

  1. [Release] Battlefield Dual Weapon AHK script
    By Cato38 in forum Battlefield Hacks & Cheats
    Replies: 25
    Last Post: 02-24-2013, 02:23 AM
  2. [Help Request] weapon change script
    By ll1312ll in forum Realm of the Mad God Help & Requests
    Replies: 8
    Last Post: 12-02-2012, 04:06 PM
  3. Spawning Dayz Weapon Crates
    By LOLurMAD in forum DayZ Selling / Trading / Buying
    Replies: 40
    Last Post: 11-02-2012, 07:09 PM
  4. Spawn Service - Vehicles, Weapons, Crates
    By ZedoX in forum DayZ Mod & Standalone Hacks & Cheats
    Replies: 91
    Last Post: 09-22-2012, 05:08 PM
  5. Weapon Crates?
    By Aggressivek in forum DayZ Mod & Standalone Hacks & Cheats
    Replies: 9
    Last Post: 08-31-2012, 11:19 AM