Jump to content
  • 0

Custom Loot Crates That Respawn After Restart


R4id3n84

Question

Hi Guys

 

Just rented a new server and installed Overpoch Origins so i need to add loot crates to Sector B

 

So here is the script i'm using to spawn in a loot crate

if (isServer) then {


		_vehicle_999999 = objNull;
		
		if (true) then
		{
		  _this = createVehicle ["RUBasicWeaponsBox", [22459.9,20053.2,0.00143862], [], 0, "CAN_COLLIDE"];
		  _vehicle_999999 = _this;
		  _this setDir 20;

		  clearWeaponCargoGlobal _this;
		  clearMagazineCargoGlobal _this;

		  // Guns
		  _this addWeaponCargoGlobal ["BAF_AS50_scoped",2];
		  _this addWeaponCargoGlobal ["BAF_AS50_TWS",2];
		  _this addWeaponCargoGlobal ["M107_DZ",2];
		  _this addWeaponCargoGlobal ["M107_TWS_EP1_DZ",2];
		  _this addWeaponCargoGlobal ["BAF_LRR_scoped",2];
		  _this addWeaponCargoGlobal ["BAF_LRR_scoped_W",2];
		  _this addWeaponCargoGlobal ["USSR_cheytacM200",2];
		  _this addWeaponCargoGlobal ["USSR_cheytacM200_sd",2];
		  _this addWeaponCargoGlobal ["vil_M110",2];
		  _this addWeaponCargoGlobal ["vil_M110sd",2];
		  _this addWeaponCargoGlobal ["M110_NVG_EP1",2];
		  _this addWeaponCargoGlobal ["M110_TWS_EP1",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_SD_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_NV_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_NV_SD_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_TWS_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_TWS_SD_DESERT",2];
		  _this addWeaponCargoGlobal ["M249_m145_EP1_DZE",2];
		  _this addWeaponCargoGlobal ["M249_TWS_EP1",2];

		  // Ammo
		  _this addMagazineCargoGlobal ["5Rnd_127x99_AS50",20];
		  _this addMagazineCargoGlobal ["10Rnd_127x99_m107",20];
		  _this addMagazineCargoGlobal ["5Rnd_86x70_L115A1",20];
		  _this addMagazineCargoGlobal ["USSR_5Rnd_408",20];
		  _this addMagazineCargoGlobal ["20Rnd_762x51_DMR",20];
		  _this addMagazineCargoGlobal ["FHQ_rem_5Rnd_300Win_XM2010_NT",20];
		  _this addMagazineCargoGlobal ["FHQ_rem_5Rnd_300Win_XM2010_NT_SD",20];
		  _this addMagazineCargoGlobal ["200Rnd_556x45_M249",20];
		};
		
};

The crate spawns with the items inside

 

Problem is the server don't stay on the server for a very long time, after I've moved away from the crate and gone back to it few mins later its vanished ?

 

Anyone know what i can add to make it stay perm until the next restart no matter how many people have been near it

 

Many Thanks

 

R4id3n84

 

Link to comment
Share on other sites

16 answers to this question

Recommended Posts

  • 0

You are missing this part to make it stay on the server. The setVariable part.

  _this setDir 20;
  _vehicle_999999 setVariable ["ObjectID","1",true];
  _vehicle_999999 setVariable ["permaLoot",true];
  
  clearweaponcargoGlobal _this;
  clearmagazinecargoGlobal _this;

So it will look like this in the end.

if (isServer) then {


		_vehicle_999999 = objNull;
		
		if (true) then
		{
		  _this = createVehicle ["RUBasicWeaponsBox", [22459.9,20053.2,0.00143862], [], 0, "CAN_COLLIDE"];
		  _vehicle_999999 = _this;
		  _this setDir 20;
                  _vehicle_999999 setVariable ["ObjectID","1",true];
                  _vehicle_999999 setVariable ["permaLoot",true];

		  clearWeaponCargoGlobal _this;
		  clearMagazineCargoGlobal _this;

		  // Guns
		  _this addWeaponCargoGlobal ["BAF_AS50_scoped",2];
		  _this addWeaponCargoGlobal ["BAF_AS50_TWS",2];
		  _this addWeaponCargoGlobal ["M107_DZ",2];
		  _this addWeaponCargoGlobal ["M107_TWS_EP1_DZ",2];
		  _this addWeaponCargoGlobal ["BAF_LRR_scoped",2];
		  _this addWeaponCargoGlobal ["BAF_LRR_scoped_W",2];
		  _this addWeaponCargoGlobal ["USSR_cheytacM200",2];
		  _this addWeaponCargoGlobal ["USSR_cheytacM200_sd",2];
		  _this addWeaponCargoGlobal ["vil_M110",2];
		  _this addWeaponCargoGlobal ["vil_M110sd",2];
		  _this addWeaponCargoGlobal ["M110_NVG_EP1",2];
		  _this addWeaponCargoGlobal ["M110_TWS_EP1",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_SD_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_NV_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_NV_SD_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_TWS_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_TWS_SD_DESERT",2];
		  _this addWeaponCargoGlobal ["M249_m145_EP1_DZE",2];
		  _this addWeaponCargoGlobal ["M249_TWS_EP1",2];

		  // Ammo
		  _this addMagazineCargoGlobal ["5Rnd_127x99_AS50",20];
		  _this addMagazineCargoGlobal ["10Rnd_127x99_m107",20];
		  _this addMagazineCargoGlobal ["5Rnd_86x70_L115A1",20];
		  _this addMagazineCargoGlobal ["USSR_5Rnd_408",20];
		  _this addMagazineCargoGlobal ["20Rnd_762x51_DMR",20];
		  _this addMagazineCargoGlobal ["FHQ_rem_5Rnd_300Win_XM2010_NT",20];
		  _this addMagazineCargoGlobal ["FHQ_rem_5Rnd_300Win_XM2010_NT_SD",20];
		  _this addMagazineCargoGlobal ["200Rnd_556x45_M249",20];
		};
		
};

With this there is no need to edit the server_functions.sqf as the box will have the variable = true already

Link to comment
Share on other sites

  • 0

It will look like this if you want more then one crate in a single sqf file.

if (isServer) then {


		_vehicle_1 = objNull;
		
		if (true) then
		{
		  _this = createVehicle ["RUBasicWeaponsBox", [22459.9,20053.2,0.00143862], [], 0, "CAN_COLLIDE"];
		  _vehicle_1 = _this;
		  _this setDir 20;
                  _vehicle_1 setVariable ["ObjectID","1",true];
                  _vehicle_1 setVariable ["permaLoot",true];

		  clearWeaponCargoGlobal _this;
		  clearMagazineCargoGlobal _this;

		  // Guns
		  _this addWeaponCargoGlobal ["BAF_AS50_scoped",2];
		  _this addWeaponCargoGlobal ["BAF_AS50_TWS",2];
		  _this addWeaponCargoGlobal ["M107_DZ",2];
		  _this addWeaponCargoGlobal ["M107_TWS_EP1_DZ",2];
		  _this addWeaponCargoGlobal ["BAF_LRR_scoped",2];
		  _this addWeaponCargoGlobal ["BAF_LRR_scoped_W",2];
		  _this addWeaponCargoGlobal ["USSR_cheytacM200",2];
		  _this addWeaponCargoGlobal ["USSR_cheytacM200_sd",2];
		  _this addWeaponCargoGlobal ["vil_M110",2];
		  _this addWeaponCargoGlobal ["vil_M110sd",2];
		  _this addWeaponCargoGlobal ["M110_NVG_EP1",2];
		  _this addWeaponCargoGlobal ["M110_TWS_EP1",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_SD_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_NV_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_NV_SD_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_TWS_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_TWS_SD_DESERT",2];
		  _this addWeaponCargoGlobal ["M249_m145_EP1_DZE",2];
		  _this addWeaponCargoGlobal ["M249_TWS_EP1",2];

		  // Ammo
		  _this addMagazineCargoGlobal ["5Rnd_127x99_AS50",20];
		  _this addMagazineCargoGlobal ["10Rnd_127x99_m107",20];
		  _this addMagazineCargoGlobal ["5Rnd_86x70_L115A1",20];
		  _this addMagazineCargoGlobal ["USSR_5Rnd_408",20];
		  _this addMagazineCargoGlobal ["20Rnd_762x51_DMR",20];
		  _this addMagazineCargoGlobal ["FHQ_rem_5Rnd_300Win_XM2010_NT",20];
		  _this addMagazineCargoGlobal ["FHQ_rem_5Rnd_300Win_XM2010_NT_SD",20];
		  _this addMagazineCargoGlobal ["200Rnd_556x45_M249",20];
		};

		_vehicle_2 = objNull;
		
		if (true) then
		{
		  _this = createVehicle ["RUBasicWeaponsBox", [22459.9,20053.2,0.00143862], [], 0, "CAN_COLLIDE"];
		  _vehicle_2 = _this;
		  _this setDir 20;
                  _vehicle_2 setVariable ["ObjectID","1",true];
                  _vehicle_2 setVariable ["permaLoot",true];

		  clearWeaponCargoGlobal _this;
		  clearMagazineCargoGlobal _this;

		  // Guns
		  _this addWeaponCargoGlobal ["BAF_AS50_scoped",2];
		  _this addWeaponCargoGlobal ["BAF_AS50_TWS",2];
		  _this addWeaponCargoGlobal ["M107_DZ",2];
		  _this addWeaponCargoGlobal ["M107_TWS_EP1_DZ",2];
		  _this addWeaponCargoGlobal ["BAF_LRR_scoped",2];
		  _this addWeaponCargoGlobal ["BAF_LRR_scoped_W",2];
		  _this addWeaponCargoGlobal ["USSR_cheytacM200",2];
		  _this addWeaponCargoGlobal ["USSR_cheytacM200_sd",2];
		  _this addWeaponCargoGlobal ["vil_M110",2];
		  _this addWeaponCargoGlobal ["vil_M110sd",2];
		  _this addWeaponCargoGlobal ["M110_NVG_EP1",2];
		  _this addWeaponCargoGlobal ["M110_TWS_EP1",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_SD_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_NV_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_NV_SD_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_TWS_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_TWS_SD_DESERT",2];
		  _this addWeaponCargoGlobal ["M249_m145_EP1_DZE",2];
		  _this addWeaponCargoGlobal ["M249_TWS_EP1",2];

		  // Ammo
		  _this addMagazineCargoGlobal ["5Rnd_127x99_AS50",20];
		  _this addMagazineCargoGlobal ["10Rnd_127x99_m107",20];
		  _this addMagazineCargoGlobal ["5Rnd_86x70_L115A1",20];
		  _this addMagazineCargoGlobal ["USSR_5Rnd_408",20];
		  _this addMagazineCargoGlobal ["20Rnd_762x51_DMR",20];
		  _this addMagazineCargoGlobal ["FHQ_rem_5Rnd_300Win_XM2010_NT",20];
		  _this addMagazineCargoGlobal ["FHQ_rem_5Rnd_300Win_XM2010_NT_SD",20];
		  _this addMagazineCargoGlobal ["200Rnd_556x45_M249",20];
		};

		_vehicle_3 = objNull;
		
		if (true) then
		{
		  _this = createVehicle ["RUBasicWeaponsBox", [22459.9,20053.2,0.00143862], [], 0, "CAN_COLLIDE"];
		  _vehicle_3 = _this;
		  _this setDir 20;
                  _vehicle_3 setVariable ["ObjectID","1",true];
                  _vehicle_3 setVariable ["permaLoot",true];

		  clearWeaponCargoGlobal _this;
		  clearMagazineCargoGlobal _this;

		  // Guns
		  _this addWeaponCargoGlobal ["BAF_AS50_scoped",2];
		  _this addWeaponCargoGlobal ["BAF_AS50_TWS",2];
		  _this addWeaponCargoGlobal ["M107_DZ",2];
		  _this addWeaponCargoGlobal ["M107_TWS_EP1_DZ",2];
		  _this addWeaponCargoGlobal ["BAF_LRR_scoped",2];
		  _this addWeaponCargoGlobal ["BAF_LRR_scoped_W",2];
		  _this addWeaponCargoGlobal ["USSR_cheytacM200",2];
		  _this addWeaponCargoGlobal ["USSR_cheytacM200_sd",2];
		  _this addWeaponCargoGlobal ["vil_M110",2];
		  _this addWeaponCargoGlobal ["vil_M110sd",2];
		  _this addWeaponCargoGlobal ["M110_NVG_EP1",2];
		  _this addWeaponCargoGlobal ["M110_TWS_EP1",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_SD_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_NV_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_NV_SD_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_TWS_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_TWS_SD_DESERT",2];
		  _this addWeaponCargoGlobal ["M249_m145_EP1_DZE",2];
		  _this addWeaponCargoGlobal ["M249_TWS_EP1",2];

		  // Ammo
		  _this addMagazineCargoGlobal ["5Rnd_127x99_AS50",20];
		  _this addMagazineCargoGlobal ["10Rnd_127x99_m107",20];
		  _this addMagazineCargoGlobal ["5Rnd_86x70_L115A1",20];
		  _this addMagazineCargoGlobal ["USSR_5Rnd_408",20];
		  _this addMagazineCargoGlobal ["20Rnd_762x51_DMR",20];
		  _this addMagazineCargoGlobal ["FHQ_rem_5Rnd_300Win_XM2010_NT",20];
		  _this addMagazineCargoGlobal ["FHQ_rem_5Rnd_300Win_XM2010_NT_SD",20];
		  _this addMagazineCargoGlobal ["200Rnd_556x45_M249",20];
		};

		_vehicle_4 = objNull;
		
		if (true) then
		{
		  _this = createVehicle ["RUBasicWeaponsBox", [22459.9,20053.2,0.00143862], [], 0, "CAN_COLLIDE"];
		  _vehicle_4 = _this;
		  _this setDir 20;
                  _vehicle_4 setVariable ["ObjectID","1",true];
                  _vehicle_4 setVariable ["permaLoot",true];

		  clearWeaponCargoGlobal _this;
		  clearMagazineCargoGlobal _this;

		  // Guns
		  _this addWeaponCargoGlobal ["BAF_AS50_scoped",2];
		  _this addWeaponCargoGlobal ["BAF_AS50_TWS",2];
		  _this addWeaponCargoGlobal ["M107_DZ",2];
		  _this addWeaponCargoGlobal ["M107_TWS_EP1_DZ",2];
		  _this addWeaponCargoGlobal ["BAF_LRR_scoped",2];
		  _this addWeaponCargoGlobal ["BAF_LRR_scoped_W",2];
		  _this addWeaponCargoGlobal ["USSR_cheytacM200",2];
		  _this addWeaponCargoGlobal ["USSR_cheytacM200_sd",2];
		  _this addWeaponCargoGlobal ["vil_M110",2];
		  _this addWeaponCargoGlobal ["vil_M110sd",2];
		  _this addWeaponCargoGlobal ["M110_NVG_EP1",2];
		  _this addWeaponCargoGlobal ["M110_TWS_EP1",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_SD_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_NV_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_NV_SD_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_TWS_DESERT",2];
		  _this addWeaponCargoGlobal ["FHQ_XM2010_TWS_SD_DESERT",2];
		  _this addWeaponCargoGlobal ["M249_m145_EP1_DZE",2];
		  _this addWeaponCargoGlobal ["M249_TWS_EP1",2];

		  // Ammo
		  _this addMagazineCargoGlobal ["5Rnd_127x99_AS50",20];
		  _this addMagazineCargoGlobal ["10Rnd_127x99_m107",20];
		  _this addMagazineCargoGlobal ["5Rnd_86x70_L115A1",20];
		  _this addMagazineCargoGlobal ["USSR_5Rnd_408",20];
		  _this addMagazineCargoGlobal ["20Rnd_762x51_DMR",20];
		  _this addMagazineCargoGlobal ["FHQ_rem_5Rnd_300Win_XM2010_NT",20];
		  _this addMagazineCargoGlobal ["FHQ_rem_5Rnd_300Win_XM2010_NT_SD",20];
		  _this addMagazineCargoGlobal ["200Rnd_556x45_M249",20];
		};
		
};

Remember to not put to much loot in the crate as it can crash your server. This is the limit i recommend.

Anything More Can Cause Server To Crash
Max Weapons = 100 * Max Mags = 520 * Max Bag = 1
 

Link to comment
Share on other sites

  • 0

R4id3n84 - yeah - replace the "RUBasicWeaponsBox" part of your code with any ural designation... "UralCivil2" = I think that's the specific ural used in origins for the loot areas. Or maybe it was the yellow one... UralCivil.


Keep in mind, these urals can be entered into just like a normal playable ural, but they won't save to the database.... So you could hop in them, drive them all over the Sector B island, and it won't matter. On restart, they will get deleted and re-inserted into the map once again.

The weaponscrates at least can't be moved and requires your team of looters to actually secure the loot, rather then hijack the ural and drive it up to one of the entry points in sector B. It's all in how you want your players to deal with the area.


you might want to further blow out your boxes and make the contents variable, rather then fixed. Fixed gets boring IMO.  

Link to comment
Share on other sites

  • 0

Hello, i use this script on my Origin Overpoch Server and need a lil bit of help:

 

StaticLootSecB.sqf

if (isServer) then {
        _vehicle_1 = objNull;
        if (true) then
        {
          _this = createVehicle ["RUBasicWeaponsBox", [22487.1,20034.4,4.768e-07], [], 0, "CAN_COLLIDE"];
          _vehicle_1 = _this;
          _this setDir 20;
                  _vehicle_1 setVariable ["ObjectID","1",true];
                  _vehicle_1 setVariable ["permaLoot",true];

          clearWeaponCargoGlobal _this;
          clearMagazineCargoGlobal _this;

          // Guns
          _this addWeaponCargoGlobal ["BAF_AS50_scoped",2];
          _this addWeaponCargoGlobal ["M107_DZ",2];
          _this addWeaponCargoGlobal ["BAF_LRR_scoped",2];
          _this addWeaponCargoGlobal ["USSR_cheytacM200",2];
          _this addWeaponCargoGlobal ["USSR_cheytacM200_sd",2];
          _this addWeaponCargoGlobal ["vil_M110",2];
          _this addWeaponCargoGlobal ["vil_M110sd",2];
          _this addWeaponCargoGlobal ["M110_NVG_EP1",2];
          _this addWeaponCargoGlobal ["M110_TWS_EP1",2];
          _this addWeaponCargoGlobal ["FHQ_XM2010_DESERT",2];
          _this addWeaponCargoGlobal ["FHQ_XM2010_SD_DESERT",2];
          _this addWeaponCargoGlobal ["FHQ_XM2010_NV_DESERT",2];
          _this addWeaponCargoGlobal ["FHQ_XM2010_NV_SD_DESERT",2];
          _this addWeaponCargoGlobal ["FHQ_XM2010_TWS_DESERT",2];
          _this addWeaponCargoGlobal ["FHQ_XM2010_TWS_SD_DESERT",2];

          // Ammo
          _this addMagazineCargoGlobal ["5Rnd_127x99_AS50",20];
          _this addMagazineCargoGlobal ["10Rnd_127x99_m107",20];
          _this addMagazineCargoGlobal ["5Rnd_86x70_L115A1",20];
          _this addMagazineCargoGlobal ["USSR_5Rnd_408",20];
          _this addMagazineCargoGlobal ["20Rnd_762x51_DMR",20];
          _this addMagazineCargoGlobal ["FHQ_rem_5Rnd_300Win_XM2010_NT",20];
          _this addMagazineCargoGlobal ["FHQ_rem_5Rnd_300Win_XM2010_NT_SD",20];
        };

        _vehicle_2 = objNull;
        
        if (true) then
        {
          _this = createVehicle ["RUBasicWeaponsBox", [22465.3,19487.3,4.768e-07], [], 0, "CAN_COLLIDE"];
          _vehicle_2 = _this;
          _this setDir 20;
                  _vehicle_2 setVariable ["ObjectID","1",true];
                  _vehicle_2 setVariable ["permaLoot",true];

          clearWeaponCargoGlobal _this;
          clearMagazineCargoGlobal _this;

          // Guns
          _this addWeaponCargoGlobal ["ItemToolbox",5];
          _this addWeaponCargoGlobal ["ItemCrowbar",5];
          _this addWeaponCargoGlobal ["ItemEtool",5];
          _this addWeaponCargoGlobal ["ChainSawR",1];
          _this addWeaponCargoGlobal ["ChainSawP",1];
          _this addWeaponCargoGlobal ["ChainSawG",1];
          _this addWeaponCargoGlobal ["ChainSawB",1];

          // Ammo
          _this addMagazineCargoGlobal ["ItemMixOil",2];
          _this addMagazineCargoGlobal ["ItemLockbox",2];
          _this addMagazineCargoGlobal ["ItemComboLock",2];
          _this addMagazineCargoGlobal ["ItemGenerator",3];
          _this addMagazineCargoGlobal ["ItemVault",2];
          _this addMagazineCargoGlobal ["ItemCorrugated",20];
          _this addMagazineCargoGlobal ["30m_plot_kit",2];
          _this addMagazineCargoGlobal ["ItemWire",10];
          _this addMagazineCargoGlobal ["ItemTankTrap",10];
          _this addMagazineCargoGlobal ["ItemSandbag",10];
          _this addMagazineCargoGlobal ["CinderBlocks",40];
          _this addMagazineCargoGlobal ["MortarBucket",20];
        };

        _vehicle_3 = objNull;
        
        if (true) then
        {
          _this = createVehicle ["RUBasicWeaponsBox", [22167.8,19851.6,0], [], 0, "CAN_COLLIDE"];
          _vehicle_3 = _this;
          _this setDir 20;
                  _vehicle_3 setVariable ["ObjectID","1",true];
                  _vehicle_3 setVariable ["permaLoot",true];

          clearWeaponCargoGlobal _this;
          clearMagazineCargoGlobal _this;

          // Guns
          _this addWeaponCargoGlobal ["ItemToolbox",5];
          _this addWeaponCargoGlobal ["ItemCrowbar",5];
          _this addWeaponCargoGlobal ["ItemEtool",5];
          _this addWeaponCargoGlobal ["ChainSawR",1];
          _this addWeaponCargoGlobal ["ChainSawP",1];
          _this addWeaponCargoGlobal ["ChainSawG",1];
          _this addWeaponCargoGlobal ["ChainSawB",1];          

          // Ammo
          _this addMagazineCargoGlobal ["ItemBloodbag",5];
          _this addMagazineCargoGlobal ["ItemEpinephrine",5];
          _this addMagazineCargoGlobal ["ItemMorphine",5];
          _this addMagazineCargoGlobal ["ItemPainkiller",5];
          _this addMagazineCargoGlobal ["ItemAntibiotic",5];
          _this addMagazineCargoGlobal ["ItemBandage",5];
          _this addMagazineCargoGlobal ["ItemSeaBassCooked",10];
          _this addMagazineCargoGlobal ["ItemTunaCooked",10];
          _this addMagazineCargoGlobal ["ItemSodaR4z0r",5];
          _this addMagazineCargoGlobal ["ItemSodaMdew",5];
          _this addMagazineCargoGlobal ["ItemSodaOrangeSherbet",5];
          _this addMagazineCargoGlobal ["ItemSodaRbull",5];
          _this addMagazineCargoGlobal ["PartEngine",5];
          _this addMagazineCargoGlobal ["PartVRotor",5];
          _this addMagazineCargoGlobal ["PartGlass",5];
          _this addMagazineCargoGlobal ["PartWheel",5];
          _this addMagazineCargoGlobal ["PartGeneric",5];
          _this addMagazineCargoGlobal ["ItemJerrycan",5];
          
        };

        _vehicle_4 = objNull;
        
        if (true) then
        {
          _this = createVehicle ["RUBasicWeaponsBox", [11923.5,21101,4.768e-07], [], 0, "CAN_COLLIDE"];
          _vehicle_4 = _this;
          _this setDir 20;
                  _vehicle_4 setVariable ["ObjectID","1",true];
                  _vehicle_4 setVariable ["permaLoot",true];

          clearWeaponCargoGlobal _this;
          clearMagazineCargoGlobal _this;

          // Guns
          _this addWeaponCargoGlobal ["ItemToolbox",5];
          _this addWeaponCargoGlobal ["ItemCrowbar",5];
          _this addWeaponCargoGlobal ["ItemEtool",5];
          _this addWeaponCargoGlobal ["ChainSawR",1];
          _this addWeaponCargoGlobal ["ChainSawP",1];
          _this addWeaponCargoGlobal ["ChainSawG",1];
          _this addWeaponCargoGlobal ["ChainSawB",1];

          // Ammo
          _this addMagazineCargoGlobal ["ItemMixOil",5];
          _this addMagazineCargoGlobal ["ItemLockbox",2];
          _this addMagazineCargoGlobal ["ItemComboLock",1];
          _this addMagazineCargoGlobal ["ItemGenerator",1];
          _this addMagazineCargoGlobal ["ItemVault",1];
          _this addMagazineCargoGlobal ["ItemCorrugated",10];
          _this addMagazineCargoGlobal ["30m_plot_kit",1];
          _this addMagazineCargoGlobal ["ItemWire",5];
          _this addMagazineCargoGlobal ["ItemTankTrap",5];
          _this addMagazineCargoGlobal ["ItemSandbag",5];
          _this addMagazineCargoGlobal ["CinderBlocks",20];
          _this addMagazineCargoGlobal ["MortarBucket",10];
          _this addMagazineCargoGlobal ["PartPlywoodPack",20];
          _this addMagazineCargoGlobal ["PartPlankPack",20];
        };
};

Init.sqf --> [] execVM "custom\StaticLootSecB.sqf";

But there are no Boxes on the server, so what did i wrong ???
thanks for any help

Link to comment
Share on other sites

  • 0

Hello, i use this script on my Origin Overpoch Server and need a lil bit of help:

 

StaticLootSecB.sqf

if (isServer) then {
        _vehicle_1 = objNull;
        if (true) then
        {
          _this = createVehicle ["RUBasicWeaponsBox", [22487.1,20034.4,4.768e-07], [], 0, "CAN_COLLIDE"];
          _vehicle_1 = _this;
          _this setDir 20;
                  _vehicle_1 setVariable ["ObjectID","1",true];
                  _vehicle_1 setVariable ["permaLoot",true];

          clearWeaponCargoGlobal _this;
          clearMagazineCargoGlobal _this;

          // Guns
          _this addWeaponCargoGlobal ["BAF_AS50_scoped",2];
          _this addWeaponCargoGlobal ["M107_DZ",2];
          _this addWeaponCargoGlobal ["BAF_LRR_scoped",2];
          _this addWeaponCargoGlobal ["USSR_cheytacM200",2];
          _this addWeaponCargoGlobal ["USSR_cheytacM200_sd",2];
          _this addWeaponCargoGlobal ["vil_M110",2];
          _this addWeaponCargoGlobal ["vil_M110sd",2];
          _this addWeaponCargoGlobal ["M110_NVG_EP1",2];
          _this addWeaponCargoGlobal ["M110_TWS_EP1",2];
          _this addWeaponCargoGlobal ["FHQ_XM2010_DESERT",2];
          _this addWeaponCargoGlobal ["FHQ_XM2010_SD_DESERT",2];
          _this addWeaponCargoGlobal ["FHQ_XM2010_NV_DESERT",2];
          _this addWeaponCargoGlobal ["FHQ_XM2010_NV_SD_DESERT",2];
          _this addWeaponCargoGlobal ["FHQ_XM2010_TWS_DESERT",2];
          _this addWeaponCargoGlobal ["FHQ_XM2010_TWS_SD_DESERT",2];

          // Ammo
          _this addMagazineCargoGlobal ["5Rnd_127x99_AS50",20];
          _this addMagazineCargoGlobal ["10Rnd_127x99_m107",20];
          _this addMagazineCargoGlobal ["5Rnd_86x70_L115A1",20];
          _this addMagazineCargoGlobal ["USSR_5Rnd_408",20];
          _this addMagazineCargoGlobal ["20Rnd_762x51_DMR",20];
          _this addMagazineCargoGlobal ["FHQ_rem_5Rnd_300Win_XM2010_NT",20];
          _this addMagazineCargoGlobal ["FHQ_rem_5Rnd_300Win_XM2010_NT_SD",20];
        };

        _vehicle_2 = objNull;
        
        if (true) then
        {
          _this = createVehicle ["RUBasicWeaponsBox", [22465.3,19487.3,4.768e-07], [], 0, "CAN_COLLIDE"];
          _vehicle_2 = _this;
          _this setDir 20;
                  _vehicle_2 setVariable ["ObjectID","1",true];
                  _vehicle_2 setVariable ["permaLoot",true];

          clearWeaponCargoGlobal _this;
          clearMagazineCargoGlobal _this;

          // Guns
          _this addWeaponCargoGlobal ["ItemToolbox",5];
          _this addWeaponCargoGlobal ["ItemCrowbar",5];
          _this addWeaponCargoGlobal ["ItemEtool",5];
          _this addWeaponCargoGlobal ["ChainSawR",1];
          _this addWeaponCargoGlobal ["ChainSawP",1];
          _this addWeaponCargoGlobal ["ChainSawG",1];
          _this addWeaponCargoGlobal ["ChainSawB",1];

          // Ammo
          _this addMagazineCargoGlobal ["ItemMixOil",2];
          _this addMagazineCargoGlobal ["ItemLockbox",2];
          _this addMagazineCargoGlobal ["ItemComboLock",2];
          _this addMagazineCargoGlobal ["ItemGenerator",3];
          _this addMagazineCargoGlobal ["ItemVault",2];
          _this addMagazineCargoGlobal ["ItemCorrugated",20];
          _this addMagazineCargoGlobal ["30m_plot_kit",2];
          _this addMagazineCargoGlobal ["ItemWire",10];
          _this addMagazineCargoGlobal ["ItemTankTrap",10];
          _this addMagazineCargoGlobal ["ItemSandbag",10];
          _this addMagazineCargoGlobal ["CinderBlocks",40];
          _this addMagazineCargoGlobal ["MortarBucket",20];
        };

        _vehicle_3 = objNull;
        
        if (true) then
        {
          _this = createVehicle ["RUBasicWeaponsBox", [22167.8,19851.6,0], [], 0, "CAN_COLLIDE"];
          _vehicle_3 = _this;
          _this setDir 20;
                  _vehicle_3 setVariable ["ObjectID","1",true];
                  _vehicle_3 setVariable ["permaLoot",true];

          clearWeaponCargoGlobal _this;
          clearMagazineCargoGlobal _this;

          // Guns
          _this addWeaponCargoGlobal ["ItemToolbox",5];
          _this addWeaponCargoGlobal ["ItemCrowbar",5];
          _this addWeaponCargoGlobal ["ItemEtool",5];
          _this addWeaponCargoGlobal ["ChainSawR",1];
          _this addWeaponCargoGlobal ["ChainSawP",1];
          _this addWeaponCargoGlobal ["ChainSawG",1];
          _this addWeaponCargoGlobal ["ChainSawB",1];          

          // Ammo
          _this addMagazineCargoGlobal ["ItemBloodbag",5];
          _this addMagazineCargoGlobal ["ItemEpinephrine",5];
          _this addMagazineCargoGlobal ["ItemMorphine",5];
          _this addMagazineCargoGlobal ["ItemPainkiller",5];
          _this addMagazineCargoGlobal ["ItemAntibiotic",5];
          _this addMagazineCargoGlobal ["ItemBandage",5];
          _this addMagazineCargoGlobal ["ItemSeaBassCooked",10];
          _this addMagazineCargoGlobal ["ItemTunaCooked",10];
          _this addMagazineCargoGlobal ["ItemSodaR4z0r",5];
          _this addMagazineCargoGlobal ["ItemSodaMdew",5];
          _this addMagazineCargoGlobal ["ItemSodaOrangeSherbet",5];
          _this addMagazineCargoGlobal ["ItemSodaRbull",5];
          _this addMagazineCargoGlobal ["PartEngine",5];
          _this addMagazineCargoGlobal ["PartVRotor",5];
          _this addMagazineCargoGlobal ["PartGlass",5];
          _this addMagazineCargoGlobal ["PartWheel",5];
          _this addMagazineCargoGlobal ["PartGeneric",5];
          _this addMagazineCargoGlobal ["ItemJerrycan",5];
          
        };

        _vehicle_4 = objNull;
        
        if (true) then
        {
          _this = createVehicle ["RUBasicWeaponsBox", [11923.5,21101,4.768e-07], [], 0, "CAN_COLLIDE"];
          _vehicle_4 = _this;
          _this setDir 20;
                  _vehicle_4 setVariable ["ObjectID","1",true];
                  _vehicle_4 setVariable ["permaLoot",true];

          clearWeaponCargoGlobal _this;
          clearMagazineCargoGlobal _this;

          // Guns
          _this addWeaponCargoGlobal ["ItemToolbox",5];
          _this addWeaponCargoGlobal ["ItemCrowbar",5];
          _this addWeaponCargoGlobal ["ItemEtool",5];
          _this addWeaponCargoGlobal ["ChainSawR",1];
          _this addWeaponCargoGlobal ["ChainSawP",1];
          _this addWeaponCargoGlobal ["ChainSawG",1];
          _this addWeaponCargoGlobal ["ChainSawB",1];

          // Ammo
          _this addMagazineCargoGlobal ["ItemMixOil",5];
          _this addMagazineCargoGlobal ["ItemLockbox",2];
          _this addMagazineCargoGlobal ["ItemComboLock",1];
          _this addMagazineCargoGlobal ["ItemGenerator",1];
          _this addMagazineCargoGlobal ["ItemVault",1];
          _this addMagazineCargoGlobal ["ItemCorrugated",10];
          _this addMagazineCargoGlobal ["30m_plot_kit",1];
          _this addMagazineCargoGlobal ["ItemWire",5];
          _this addMagazineCargoGlobal ["ItemTankTrap",5];
          _this addMagazineCargoGlobal ["ItemSandbag",5];
          _this addMagazineCargoGlobal ["CinderBlocks",20];
          _this addMagazineCargoGlobal ["MortarBucket",10];
          _this addMagazineCargoGlobal ["PartPlywoodPack",20];
          _this addMagazineCargoGlobal ["PartPlankPack",20];
        };
};

Init.sqf --> [] execVM "custom\StaticLootSecB.sqf";

But there are no Boxes on the server, so what did i wrong ???

thanks for any help

 

 

Is the StaticLootSecB.sqf inside your  MPmission\custom\   folder???

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...