nidico100 Posted January 8, 2016 Report Share Posted January 8, 2016 I added some crates to my map. The first one works fine it's loaded with ak's and ammo. _crate1 = objNull; if (true) then { _this = createVehicle ["SpecialWeaponsBox", [9016.3799, 12927.087, 3.5677726], [], 0, "CAN_COLLIDE"]; _crate1 = _this; clearweaponcargoGlobal _this; clearmagazinecargoGlobal _this; _this addWeaponCargoGlobal ["AK_74",5]; _this addWeaponCargoGlobal ["AK_47_M",1]; _this addWeaponCargoGlobal ["AK_47_S",1]; _this addmagazineCargoGlobal ["30Rnd_762x39_AK47",10]; _this addmagazineCargoGlobal ["30Rnd_545x39_AK",25]; _this setPos [9016.3799, 12927.087, 3.5677726]; }; but the other 3 don't have loot inside. they spawn empty i wanted them to spawn "ItemKiloHemp" and "ItemZombieParts". _crate2 = objNull; if (true) then { _this = createVehicle ["USOrdnanceBox", [9009.8037, 12930.672, 3.6088436], [], 0, "CAN_COLLIDE"]; _crate2 = _this; clearweaponcargoGlobal _this; clearmagazinecargoGlobal _this; _this addmagazineCargoGlobal [["ItemKiloHemp",50]]; _this setPos [9009.8037, 12930.672, 3.6088436]; }; _crate3 = objNull; if (true) then { _this = createVehicle ["USOrdnanceBox",[9013.2539, 12930.277, 0.34331667], [], 0, "CAN_COLLIDE"]; _crate3 = _this; clearweaponcargoGlobal _this; clearmagazinecargoGlobal _this; _this addmagazineCargoGlobal [["ItemZombieParts",12]]; _this setPos [9013.2539, 12930.277, 0.34331667]; }; _crate4 = objNull; if (true) then { _this = createVehicle ["USOrdnanceBox",[9027.3027, 12928.585, 0.02336337], [], 0, "CAN_COLLIDE"]; _crate4 = _this; clearweaponcargoGlobal _this; clearmagazinecargoGlobal _this; _this addmagazineCargoGlobal [["ItemKiloHemp",7]]; _this setPos [9027.3027, 12928.585, 0.02336337]; }; Link to comment Share on other sites More sharing options...
nidico100 Posted January 8, 2016 Author Report Share Posted January 8, 2016 [SOLVED] Link to comment Share on other sites More sharing options...
Hooty Posted August 31, 2016 Report Share Posted August 31, 2016 Is this how you would change the loot from arma editor default? Link to comment Share on other sites More sharing options...
juandayz Posted August 31, 2016 Report Share Posted August 31, 2016 On 8/31/2016 at 12:24 PM, Hooty said: Is this how you would change the loot from arma editor default? Expand to change the default loot first use clearWeaponCargoGlobal and clearMagazineCargoGlobal (this gonna delete all default loot) Then you need fill the crate again with your loot using: addWeaponCargoGlobal and addmagazinecargoglobal so an example: Reveal hidden contents _crate1 = objNull; if (true) then { _this = createVehicle ["USBasicWeapons_EP1", _position, [], 0, "CAN_COLLIDE"]; _crate1 = _this; _smoke = "SmokeShellBlue" createVehicle (getPos _crate1); _smoke attachTo [_crate1, [0,0,0]]; clearWeaponCargoGlobal _crate1; clearMagazineCargoGlobal _crate1; _crate1 addWeaponCargoGlobal ["ItemToolbox", 2]; _crate1 addWeaponCargoGlobal ["SCAR_H_LNG_Sniper", 1]; _crate1 addmagazinecargoglobal ["bulk_ItemWire",2]; _crate1 addmagazinecargoglobal ["ItemAntibiotic",2]; }; Hooty 1 Link to comment Share on other sites More sharing options...
Hooty Posted August 31, 2016 Report Share Posted August 31, 2016 So i would take this Reveal hidden contents _vehicle_213 = objNull; if (true) then { _this = createVehicle ["RULaunchersBox", [2065.8647, 5222.1279, -4.5776367e-005], [], 0, "CAN_COLLIDE"]; _vehicle_213 = _this; _this setDir -15.726418; _this setPos [2065.8647, 5222.1279, -4.5776367e-005]; _this setVariable ["permaLoot",true]; }; and change it to this Reveal hidden contents _crate1 = objNull; _vehicle_213 = objNull; if (true) then { _this = createVehicle ["RULaunchersBox", [2065.8647, 5222.1279, -4.5776367e-005], [], 0, "CAN_COLLIDE"]; _crate1 = _this; _this setDir -15.726418; clearWeaponCargoGlobal _crate1; clearMagazineCargoGlobal _crate1; _crate1 addWeaponCargoGlobal ["ItemToolbox", 2]; _crate1 addWeaponCargoGlobal ["ItemSledge", 1]; _crate1 addWeaponCargoGlobal ["ItemShovel", 1]; _crate1 addWeaponCargoGlobal ["M24_des_EP1", 2]; _crate1 addWeaponCargoGlobal ["SCAR_H_LNG_Sniper", 1]; _crate1 addmagazinecargoglobal ["bulk_ItemWire",2]; _crate1 addmagazinecargoglobal ["ItemAntibiotic",2]; _crate1 addmagazinecargoglobal ["ItemBriefcase100oz",1]; _crate1 addmagazinecargoglobal ["forest_large_net_kit",2]; _crate1 addmagazinecargoglobal ["bulk_ItemSandbag",2]; _crate1 addmagazinecargoglobal ["CinderBlocks",10]; _crate1 addmagazinecargoglobal ["Skin_GUE_Commander_DZ",1]; _crate1 addmagazinecargoglobal ["20Rnd_762x51_B_SCAR",3]; _crate1 addmagazinecargoglobal ["20Rnd_762x51_DMR",3]; _this setVariable ["permaLoot",true]; }; Just change the items to my liking? Do I need to remove the permaloot? Link to comment Share on other sites More sharing options...
juandayz Posted August 31, 2016 Report Share Posted August 31, 2016 @Hootyno, permaloot its fine, prevent crate despawn along time. but take a look here, you have a bad name in crates: _crate1 = objNull; _vehicle_213 = objNull; this must be: _vehicle_213 = objNull; if (true) then { so for your example: Reveal hidden contents _vehicle_213 = objNull; //(vehicle_213 its the name\or unique ID for your crate) // if (true) then { _this = createVehicle ["RULaunchersBox", [2065.8647, 5222.1279, -4.5776367e-005], [], 0, "CAN_COLLIDE"]; //Here you define the crate model and position _vehicle_213 = _this; _this setDir -15.726418; _this setPos [2065.8647, 5222.1279, -4.5776367e-005]; clearWeaponCargoGlobal _vehicle_213 ; //CLEAR ALL DEFAULT WEAPONS INTO THE CRATE CALLED _vehicle_213 (tools also are taken as weapons) clearMagazineCargoGlobal _vehicle_213 ; //CLEAR ALL DEFAULT ITEMS INTO THE CRATE CALLED _vehicle_213 _vehicle_213 addWeaponCargoGlobal ["ItemSledge", 1];//CHOOSE addWeaponCargoGlobal for fill crates with weapons or tools _vehicle_213 addmagazinecargoglobal ["Item ID", AMOUNT IN NUMBERS];//CHOOSE addMagazineCargoGlobal for fill crates with items_vehicle_213 setVariable ["permaLoot",true];//Prevent crate despawn along the server time }; ..or you can use a more advanced way , see: Reveal hidden contents //##############LOOT CONFIG/////////////////////////////// _loot_lists = [ [ ["M9SD","FN_FAL","M4A3_CCO_EP1","AKS_74_kobra","Sa58V_RCO_EP1","ItemEtool","ItemCrowbar","ItemKnife","ItemSledge","ItemCompass","Binocular","Binocular_Vector","NVGoggles","ItemGPS"], ["ItemBriefcase100oz","150Rnd_127x107_DSHKM","20Rnd_762x51_FNFAL","20Rnd_762x51_FNFAL","20Rnd_762x51_FNFAL","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD"] ], [ ["M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"], ["ItemBriefcase100oz","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"] ], [ ["ItemToolbox","M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"], ["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"] ], [ ["ChainSaw"], ["ItemBriefcase100oz","ItemBriefcase100oz","ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemComboLock","ItemGenerator"] ], [ ["m240_scoped_EP1_DZE","Mk_48_DZ","M240_DZ","RPK_74"], ["ItemBriefcase100oz","100Rnd_762x51_M240","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_762x51_M240","100Rnd_762x51_M240","200Rnd_556x45_M249","2000Rnd_762x51_M134","2000Rnd_762x51_M134","ItemAVE","ItemLRK","ItemTNK","ItemARM","ItemORP","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked"] ], [ ["M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"], ["ItemBriefcase100oz","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","FoodCanFrankBeans","FoodCanFrankBeans","FoodCanBakedBeans","FoodMRE","HandGrenade_east","2000Rnd_762x51_M134","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"] ], [ ["VSS_vintorez","Saiga12K","M8_compact"], ["ItemBriefcase100oz","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","HandGrenade_east","HandGrenade_east","FoodCanSardines","FoodMRE","FoodPistachio","FoodNutmix","FoodMRE","FoodPistachio","FoodNutmix","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"] ] ]; /////////////////////////////////////////////////////END CONFIG LOOT/////////// /////////////////////////////////////////////////////MAKE CHOOSE TWO RANDOMS CASE TO CHOOSE LOOT TO FILL CRATE/////////// _loot = _loot_lists call BIS_fnc_selectRandom; _loot2 = _loot_lists call BIS_fnc_selectRandom; /////////////////////////////////////////////////////END /////////// /////MAKE CHOOSE A RANDOM CRATE MODELS//// _cratemodel = ["RULaunchersBox","USBasicWeapons_EP1"]; call BIS_fnc_selectRandom; ////////////////////////// //////////////////////////////////////////////////////////////THE CRATE///////// _vehicle_213 = objNull; if (true) then { _this = createVehicle [_cratemodel, [2065.8647, 5222.1279, -4.5776367e-005], [], 0, "CAN_COLLIDE"]; _vehicle_213 = _this; _this setDir -15.726418; _this setPos [2065.8647, 5222.1279, -4.5776367e-005]; clearWeaponCargoGlobal _vehicle_213 ; clearMagazineCargoGlobal _vehicle_213 ; _vehicle_213 setVariable ["permaLoot",true] }; /////////////////////////////////////////////////////////////////////END CRATE///////////////////////////// // Add loot { _vehicle_213 addWeaponCargoGlobal [_x,1]; } forEach (_loot select 0); { _vehicle_213 addMagazineCargoGlobal [_x,1]; } forEach (_loot select 1); { _vehicle_213 addWeaponCargoGlobal [_x,1]; } forEach (_loot2 select 0); { _vehicle_213 addMagazineCargoGlobal [_x,1]; } forEach (_loot2 select 1); //End Loot Hooty 1 Link to comment Share on other sites More sharing options...
Hooty Posted September 1, 2016 Report Share Posted September 1, 2016 Thank you very much works Great!!! I have the advanced set up for my missions just could not figure out how to make custom crates with the editor. Working on a weaponstash.sqf since i had to do away with my ai island to increase fps. Thanks again! P.s If i leave out the clear section will it just add weapons to the box? clearweaponcargoGlobal _this; clearmagazinecargoGlobal _this; juandayz 1 Link to comment Share on other sites More sharing options...
juandayz Posted September 1, 2016 Report Share Posted September 1, 2016 @Hooty ..."If i leave out the clear section will it just add weapons to the box?"... sory cant understand your question so well. You asking me if u not use the clearWeapons and clearmagazine the crate spawn with default loot? if is it, yes. Crate gonna fill and use the standar loot from arma2oa editor. Hooty 1 Link to comment Share on other sites More sharing options...
juandayz Posted September 1, 2016 Report Share Posted September 1, 2016 Also you can leave the job to the server creating a small function trough time. customcrate.sqf ( put into mpmissions\yourinstance\customcrates\ ) Reveal hidden contents private ["_cratemodels","_loot_lists","_loot","_loot2","_coords","_randcoors","_positioncrate","_delteTime","_crate_marker","_crate1"]; /////////////////////SMALL FUNCTION TO SPAWN THE CRATE//////////////////// fn_spawncrate = { //##############LOOT #######################// _loot_lists = [ [ ["M9SD","FN_FAL","M4A3_CCO_EP1","AKS_74_kobra","Sa58V_RCO_EP1","ItemEtool","ItemCrowbar","ItemKnife","ItemSledge","ItemCompass","Binocular","Binocular_Vector","NVGoggles","ItemGPS"], ["ItemBriefcase100oz","150Rnd_127x107_DSHKM","20Rnd_762x51_FNFAL","20Rnd_762x51_FNFAL","20Rnd_762x51_FNFAL","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_762x39_SA58","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD"] ], [ ["M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"], ["ItemBriefcase100oz","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"] ], [ ["ItemToolbox","M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"], ["15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor","metal_floor_kit","ItemWoodFloor"] ], [ ["ChainSaw"], ["ItemBriefcase100oz","ItemBriefcase100oz","ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemCorrugated","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemPole","ItemComboLock","ItemGenerator"] ], [ ["m240_scoped_EP1_DZE","Mk_48_DZ","M240_DZ","RPK_74"], ["ItemBriefcase100oz","100Rnd_762x51_M240","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_556x45_BetaCMag","100Rnd_762x51_M240","200Rnd_556x45_M249","100Rnd_762x51_M240","100Rnd_762x51_M240","200Rnd_556x45_M249","2000Rnd_762x51_M134","2000Rnd_762x51_M134","ItemAVE","ItemLRK","ItemTNK","ItemARM","ItemORP","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked","ItemSeaBassCooked"] ], [ ["M4A1_HWS_GL_SD_Camo","M16A2GL","M16A4","M16A4_GL","M16A4_ACG_GL","M16A4_ACG","M4A1","M4A1_HWS_GL","M4A1_HWS_GL_camo","M4A1_HWS_GL_SD_Camo","M4A1_RCO_GL","M4A1_Aim","M4A1_Aim_camo","M4A1_AIM_SD_camo"], ["ItemBriefcase100oz","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","FoodCanFrankBeans","FoodCanFrankBeans","FoodCanBakedBeans","FoodMRE","HandGrenade_east","2000Rnd_762x51_M134","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"] ], [ ["VSS_vintorez","Saiga12K","M8_compact"], ["ItemBriefcase100oz","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","HandGrenade_east","HandGrenade_east","FoodCanSardines","FoodMRE","FoodPistachio","FoodNutmix","FoodMRE","FoodPistachio","FoodNutmix","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"] ] ]; _loot = _loot_lists call BIS_fnc_selectRandom; _loot2 = _loot_lists call BIS_fnc_selectRandom; //#################################################################END OF LOOT AREA#########################################################/// _cratemodels=["USBasicWeapons_EP1","LocalBasicAmmunitionBox","RULaunchersBox"] call BIS_fnc_selectRandom;//FIND A CRATE MODEL TO USE _coords=[[1677.587, 7417.2876],[1682.7095, 7416.1377]];//PUT YOUR OWN COORDS //MORE OR LESS _randcoors= floor random count _coords;//SET RAND ON _COORDS VARIABLES _positioncrate = _coords select _randcoors;//FIND USABLE COORD _deleteTime = 400;//DEFINE THE TIME TO DELETE THE CRATE _crate1 = objNull; if (true) then{ _this = createVehicle [_cratemodels, _positioncrate, [], 0, "CAN_COLLIDE"]; _crate1 = _this; clearWeaponCargoGlobal _crate1;//DELETE WEAPON AND TOOLS INTO THE CRATE clearMagazineCargoGlobal _crate1;//DELETE ITEMS INTO THE CRATE }; // Add loot { _crate1 addWeaponCargoGlobal [_x,1]; } forEach (_loot select 0); { _crate1 addMagazineCargoGlobal [_x,1]; } forEach (_loot select 1); { _crate1 addWeaponCargoGlobal [_x,1]; } forEach (_loot2 select 0); { _crate1 addMagazineCargoGlobal [_x,1]; } forEach (_loot2 select 1); //end loot sleep 1; //////MARKER///////////// _crate_marker = createMarker ["SUPPLY", _positioncrate]; _crate_marker setMarkerText "SUPPLY"; _crate_marker setMarkerShape "ICON"; _crate_marker setMarkerType "SupplyVehicle"; _crate_marker setMarkerColor "ColorYellow"; _crate_marker setMarkerAlpha 1; _crate_marker setMarkerSize [1,1]; /////END MARKER////////// sleep _deleteTime;//WAIT FOR THE _deleteTime value deleteMarker _crate_marker;//DELETE MARKER deleteVehicle _crate1;//DELETE THE CRATE }; //////////////////////////////END OF FUNCTION////////////////////////////// //////////////SERVER TIME////////////////////////////////////////////////////// //////////////////FIRST SPAWN/////////////////////////////////////////////////////// waituntil {(round(time)) > 300};//TELL SERVER WAIT 300 SECONDS BEFORE SPAWN FIRST CRATE if (time > 300) then { [nil,nil,rTitleText,"Supplies,Check your Map", "PLAIN",10] call RE;//SEND A GLOBAL MSG call fn_spawncrate;//CALL THE SMALL FUNCTION TO SPAWN THE CRATE AND MARKER }; ///////////////////////////////////////////////////////////////////////////////////////// //////////////SECOND SPAWN///////////////////////////////////////////////////// waituntil {(round(time)) > 800};//TELL SERVER WAIT 300 SECONDS BEFORE SPAWN FIRST CRATE if (time > 800) then { [nil,nil,rTitleText,"Supplies,Check your Map", "PLAIN",10] call RE;//SEND A GLOBAL MSG call fn_spawncrate;//CALL THE SMALL FUNCTION TO SPAWN THE CRATE AND MARKER }; //////////////////////////////////////////////////////////////////////////// /////////////////3RD SPAWN///////////////////////////////////////////////////////COPY AND PASTE CODE ABOVE THEN CHANGE 800 FOR OTHER HIGER VALUE /////////////////////////////////////////////////////////////////////////////// ////ADD MORE SPAWNS *Now go to your init.sqf and into if (isServer) then { section , bellow: _serverMonitor = [] execVM "\z\addons\dayz_server\system\server_monitor.sqf"; paste: _customcrate = [] execVM "customcrates\customcrate.sqf"; Hooty 1 Link to comment Share on other sites More sharing options...
Hooty Posted September 2, 2016 Report Share Posted September 2, 2016 Thanks so much man. juandayz 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now