Jump to content
  • 0

Spawn a ural full of loot without killing the player if they get in


Liqu1dShadow

Question

I am making a Salvation Island/Sector B type area in Cherno, its now finished and I need the loot spawns for the 80 AI to defend (they come in waves and are localised to the section of arena the player is in so its not an 80AI dump on the server).

 

I want the loot spawning in a ural that is only active during that round and restarts with the server. I have seen players getting into vehicles I put into sqf's and they die or get kicked.

 

so how do I...

 

1) Add the Urals (I need 5)

2) Add the loot

3) Keep them until restart (Not add them to the database)

4) Stop players dieing from them

5) have only 3 wheels on them (if poss)

 

I'm using WAI if that matters (don't think it does)

 

Any help would be well revived :)

 

Aaron

Link to comment
Share on other sites

22 answers to this question

Recommended Posts

  • 0

dayz_code.pbo

 

Since it sounds like you've not done this before, probably easiest to just pull the entire file out of there, make the edits, and add to your mission file. Also make the override in init.sqf to change the file location.

Link to comment
Share on other sites

  • 0

Grab the dayz_code.pbo from the @dayz_epoch folder,

unpack it and search for "variables.sqf" copy the file out and paste it in your mission folder, maybe if you have one, in a custom folder inside your mission.

then in your init.sqf search for "variables.sqf" and change the path to the custom path for you custom variables.sqf ( something like:  call compile preprocessFileLineNumbers "custom\variables.sqf";  )

then in your custom variables.sqf find this:

DZE_safeVehicle = ["ParachuteWest","ParachuteC"];

and add there ural classname like this:

DZE_safeVehicle = ["ParachuteWest","ParachuteC","URAL_CLASSNAMEHERE"];

thats is it.

anyway body, thats the wrong section for support :)

Link to comment
Share on other sites

  • 0

'dayz_code.pbo' is sitting on your PC in the Dayz_Epoch folder. You'll need something like PBO Manager to extract the file.

 

Do as StiflersM0M posted above, then re-package the PBO and upload via the dayz.st control panel. Restart server.

Link to comment
Share on other sites

  • 0

to stop this you need to edit your server_cleanup.fsm around the check for hackers part.

and then add 

_this setVariable ["Sarge",1,true];

or something similar to each of the vehicles init's? 

 

or if you're using epoch admin tools. you would use malsar instead of sarge

 

this is assuming that you see KILLING A HACKER: entries in your rpt logs. and thats what is killing your players? 

 

edit: refer to this 

Link to comment
Share on other sites

  • 0

Grab the dayz_code.pbo from the @dayz_epoch folder,

unpack it and search for "variables.sqf" copy the file out and paste it in your mission folder, maybe if you have one, in a custom folder inside your mission.

then in your init.sqf search for "variables.sqf" and change the path to the custom path for you custom variables.sqf ( something like:  call compile preprocessFileLineNumbers "custom\variables.sqf";  )

then in your custom variables.sqf find this:

DZE_safeVehicle = ["ParachuteWest","ParachuteC"];

and add there ural classname like this:

DZE_safeVehicle = ["ParachuteWest","ParachuteC","URAL_CLASSNAMEHERE"];

thats is it.

anyway body, thats the wrong section for support :)

 

Tried this, and the Ural just disappears lol, im gunna cry lol

 

 

This is my RPT

16:47:22 "infiSTAR.de ******ADMIN-LOGIN******: Liqu1dShadow(7656XXXXXXXXX7330)"
16:47:38 "infiSTAR.de PlayerConnected: _uid: 765XXXXXXXXX11327   _name: [GOC] Cheek"
16:47:38 "infiSTAR.de - Player-Log: [GOC] Cheek(765XXXXXXXXX11327) - 0h 05min"
16:47:55 "infiSTAR.de Log: Liqu1dShadow (7656XXXXXXXXX7330) | DELETED Vehicle with Invalid ID(0): Ural_UN_EP1 @025102"
16:47:55 "["PVAHR_0_wtevvcrpoeyf",["Liqu1dShadow","7656XXXXXXXXX7330","DELETED Vehicle with Invalid ID(0): Ural_UN_EP1 @025102"]]"
16:48:38 Cannot load sound 'sow_sounds\guns\r_m4.wss'
16:48:43 "infiSTAR.de PlayerConnected: _uid: 765XXXXXXXXX461542   _name: Fox"
16:48:43 "infiSTAR.de - Player-Log: Fox(765XXXXXXXXX461542) - 0h 06min"
16:49:04 Cannot load sound 'sow_sounds\guns\r_m4.wss'
16:49:12 "infiSTAR.de PlayerConnected: _uid: 7656XXXXXXXXX43554   _name: Re!apse"
16:49:12 "infiSTAR.de - Player-Log: Re!apse(765XXXXXXXXX43554) - 0h 07min"
Link to comment
Share on other sites

  • 0

Tried this, and the Ural just disappears lol, im gunna cry lol

This is my RPT

16:47:22 "infiSTAR.de ******ADMIN-LOGIN******: Liqu1dShadow(7656XXXXXXXXX7330)"

16:47:38 "infiSTAR.de PlayerConnected: _uid: 765XXXXXXXXX11327 _name: [GOC] Cheek"

16:47:38 "infiSTAR.de - Player-Log: [GOC] Cheek(765XXXXXXXXX11327) - 0h 05min"

16:47:55 "infiSTAR.de Log: Liqu1dShadow (7656XXXXXXXXX7330) | DELETED Vehicle with Invalid ID(0): Ural_UN_EP1 @025102"

16:47:55 "["PVAHR_0_wtevvcrpoeyf",["Liqu1dShadow","7656XXXXXXXXX7330","DELETED Vehicle with Invalid ID(0): Ural_UN_EP1 @025102"]]"

16:48:38 Cannot load sound 'sow_sounds\guns\r_m4.wss'

16:48:43 "infiSTAR.de PlayerConnected: _uid: 765XXXXXXXXX461542 _name: Fox"

16:48:43 "infiSTAR.de - Player-Log: Fox(765XXXXXXXXX461542) - 0h 06min"

16:49:04 Cannot load sound 'sow_sounds\guns\r_m4.wss'

16:49:12 "infiSTAR.de PlayerConnected: _uid: 7656XXXXXXXXX43554 _name: Re!apse"

16:49:12 "infiSTAR.de - Player-Log: Re!apse(765XXXXXXXXX43554) - 0h 07min"

I don't know what you are planning to do, but i have this working in my server. There is a link in my signature, if you download my files, inside the server folder there is one called custom, with a box.sqf file inside. It contains the script i' musing to spawn urals at random spots in sector b with loot inside =D you might wanna take a look.

Edit: the other change i did was in the dze safevehicle, like stiflersmom said, and then injust called the script server side.

Link to comment
Share on other sites

  • 0

I just want a Ural sat there with loot in that the player can get in and drive to a location to empty it, then when the server restarts they go back to the default location

 

if I get in it and drive it 10m or so it blew up, I added it to the safe vehicles section and now it disappears when I drive it 10m :/

 

Cant work out what I'm doing wrong for it to just be drivable lol

 

This is the script I have

 

//Ural
_vehicle_212 = objNull;
if (true) then
{
  _this = createVehicle ["Ural_UN_EP1", [2539.99, 5060.82, 0.00143], [], 0, "CAN_COLLIDE"];
  _vehicle_212 = _this;
  _this setDir -39.765995;
    //Clear Cargo    
  clearweaponcargoGlobal _this;
  clearmagazinecargoGlobal _this;
  //Add Cargo
  _this addWeaponCargoGlobal ["Binocular",2];
  _this addWeaponCargoGlobal ["Binocular_Vector",2];
  _this addWeaponCargoGlobal ["NVGoggles",2];
  _this addWeaponCargoGlobal ["ItemGPS",2];
  _this addmagazineCargoGlobal ["FoodMRE",10];
  _this addmagazineCargoGlobal ["ItemSodaMdew",10];
  _this addWeaponCargoGlobal ["M240_DZ",1];
  _this addWeaponCargoGlobal ["SCAR_L_STD_Mk4CQT",1];
  _this addWeaponCargoGlobal ["SCAR_H_CQC_CCO_SD",1];
 
  _this addmagazineCargoGlobal ["30Rnd_556x45_Stanag",20];
  _this addmagazineCargoGlobal ["20Rnd_762x51_B_SCAR",6];
  _this addmagazineCargoGlobal ["20Rnd_762x51_SB_SCAR",6];
  _this addmagazineCargoGlobal ["100Rnd_762x51_M240",2];
 
  _this setPos [2539.99, 5060.82, 0.00143];
};
 

Link to comment
Share on other sites

  • 0

I just want a Ural sat there with loot in that the player can get in and drive to a location to empty it, then when the server restarts they go back to the default location

 

if I get in it and drive it 10m or so it blew up, I added it to the safe vehicles section and now it disappears when I drive it 10m :/

 

Cant work out what I'm doing wrong for it to just be drivable lol

 

This is the script I have

 

//Ural

_vehicle_212 = objNull;

if (true) then

{

  _this = createVehicle ["Ural_UN_EP1", [2539.99, 5060.82, 0.00143], [], 0, "CAN_COLLIDE"];

  _vehicle_212 = _this;

  _this setDir -39.765995;

    //Clear Cargo    

  clearweaponcargoGlobal _this;

  clearmagazinecargoGlobal _this;

  //Add Cargo

  _this addWeaponCargoGlobal ["Binocular",2];

  _this addWeaponCargoGlobal ["Binocular_Vector",2];

  _this addWeaponCargoGlobal ["NVGoggles",2];

  _this addWeaponCargoGlobal ["ItemGPS",2];

  _this addmagazineCargoGlobal ["FoodMRE",10];

  _this addmagazineCargoGlobal ["ItemSodaMdew",10];

  _this addWeaponCargoGlobal ["M240_DZ",1];

  _this addWeaponCargoGlobal ["SCAR_L_STD_Mk4CQT",1];

  _this addWeaponCargoGlobal ["SCAR_H_CQC_CCO_SD",1];

 

  _this addmagazineCargoGlobal ["30Rnd_556x45_Stanag",20];

  _this addmagazineCargoGlobal ["20Rnd_762x51_B_SCAR",6];

  _this addmagazineCargoGlobal ["20Rnd_762x51_SB_SCAR",6];

  _this addmagazineCargoGlobal ["100Rnd_762x51_M240",2];

 

  _this setPos [2539.99, 5060.82, 0.00143];

};

 

 

Did you tried to do what i said? because i had no problems at all with that system.. I could run it just fine.

The only edit you will need to do is on the wheels. I have a init line to remove 3 wheels from the ural.

Link to comment
Share on other sites

  • 0

Grab the dayz_code.pbo from the @dayz_epoch folder,

unpack it and search for "variables.sqf" copy the file out and paste it in your mission folder, maybe if you have one, in a custom folder inside your mission.

then in your init.sqf search for "variables.sqf" and change the path to the custom path for you custom variables.sqf ( something like:  call compile preprocessFileLineNumbers "custom\variables.sqf";  )

then in your custom variables.sqf find this:

DZE_safeVehicle = ["ParachuteWest","ParachuteC"];

and add there ural classname like this:

DZE_safeVehicle = ["ParachuteWest","ParachuteC","URAL_CLASSNAMEHERE"];

thats is it.

anyway body, thats the wrong section for support :)

 

would doing this stop the loot from spawning,

 

If i use the default variable.sqf then loot spawns, use this custom one then it does not :/

Link to comment
Share on other sites

  • 0

Here is what i did (this is working fine!)

 

dayz_server/system/server_monitor.sqf - Add this line to the bottom: 

[] ExecVM "\z\addons\dayz_server\custom\box.sqf";

-In your dayz_server folder, create a folder and call it "custom" or other name you like (if you already have one, you can use it. It's just to keep things organized).

 

-In the folder "custom" create a file and call it box.sqf (or the name you want). Keep in mind, you need to change the path if you use a different name for the folde or the .sqf file.

 

-In the box.sqf paste this code: 

 

private ["_crate","_crate2","_crate3","_crate4"];


DZMSProtectObj = {
	private ["_object","_objectID"];
	_object = _this select 0;
	
	_objectID = str(round(random 999999));
	_object setVariable ["ObjectID", _objectID, true];
	_object setVariable ["ObjectUID", _objectID, true];
	
	if (_object isKindOf "ReammoBox") then {
		// PermaLoot on top of ObjID because that "arma logic"
		_object setVariable ["permaLoot",true];
		_object setVariable ["Mission", "1", true];
	}; 
};



_coords = [[22162.9,19852.4,0.001],[22300.2,19961.8,0.001]] call BIS_fnc_selectRandom; //frente prefeitura - casas OK
_coords2 = [[22462.4,19499.4,0.001],[22539.1,19900.4,0.001]] call BIS_fnc_selectRandom; //quadrado - antena - 
_coords3 = [[22491.3,20059.3,0.001],[22158.2,19519.1,0.001]] call BIS_fnc_selectRandom; //container - escola
_coords4 = [[22805.9,19853.7,0.001],[22147.2,19933.2,0.001]] call BIS_fnc_selectRandom; //hotel - oficina


// CREATE FIRST BOX
_crate = createVehicle ["UralCivil2",[(_coords select 0),(_coords select 1),0],[], 0, "CAN_COLLIDE"];
_crate setVehicleInit " 
							this setHit [""wheel_2_3_steering"", 1];
							this setHit [""wheel_2_2_steering"", 1];
							this setHit [""wheel_1_1_steering"", 1];
							this setHit [""wheel_1_3_steering"", 1];
							this allowDamage false;
						";
clearWeaponCargoGlobal _crate;
clearMagazineCargoGlobal _crate;

//ARMAS PRIMARIAS
_crate addWeaponCargoGlobal ["M24", 2];
_crate addWeaponCargoGlobal ["M4SPR", 2];
_crate addWeaponCargoGlobal ["Sa58V_RCO_EP1", 2];
_crate addWeaponCargoGlobal ["m16a4_acg", 2];
_crate addWeaponCargoGlobal ["FN_FAL_ANPVS4", 2];
_crate addWeaponCargoGlobal ["FN_FAL", 2];

//PISTOLAS
_crate addWeaponCargoGlobal ["glock17_EP1", 4];
_crate addWeaponCargoGlobal ["M9", 4];
_crate addWeaponCargoGlobal ["M9SD", 4];
_crate addWeaponCargoGlobal ["UZI_SD_EP1", 4];
_crate addWeaponCargoGlobal ["MakarovSD", 4];

//ITEM MÉDICO
_crate addMagazineCargoGlobal ["ItemBandage", 5];
_crate addMagazineCargoGlobal ["ItemMorphine", 5];
_crate addMagazineCargoGlobal ["ItemEpinephrine", 5];
_crate addMagazineCargoGlobal ["ItemPainkiller", 5];
_crate addMagazineCargoGlobal ["ItemWaterbottle", 5];
_crate addMagazineCargoGlobal ["FoodMRE", 5];
_crate addMagazineCargoGlobal ["ItemAntibiotic", 5];
_crate addMagazineCargoGlobal ["ItemBloodbag", 5];

//ITENS NORMAIS
_crate addMagazineCargoGlobal ["CinderBlocks", 8];
_crate addMagazineCargoGlobal ["PartGeneric", 4];
_crate addMagazineCargoGlobal ["ItemSandbag", 4];
_crate addMagazineCargoGlobal ["ItemWire", 4];
_crate addMagazineCargoGlobal ["30m_plot_kit", 1];

//ITEM TOOLBELT
_crate addWeaponCargoGlobal ["ItemToolbox", 2];
_crate addWeaponCargoGlobal ["ItemCrowbar", 2];
_crate addWeaponCargoGlobal ["ItemKnife", 2];
_crate addWeaponCargoGlobal ["ItemEtool", 2];
_crate addWeaponCargoGlobal ["ItemHatchet_DZE", 2];
_crate addWeaponCargoGlobal ["ItemMatchbox_DZE", 2];
_crate addMagazineCargoGlobal ["FlareGreen_M203", 2];
_crate addMagazineCargoGlobal ["FlareWhite_M203", 2];
_crate addMagazineCargoGlobal ["1Rnd_HE_M203", 2];
_crate addMagazineCargoGlobal ["FlareRed_M203", 2];
_crate addMagazineCargoGlobal ["Skin_GUE_Soldier_Sniper_DZ", 2];

//BACKPACKS
_crate addBackpackCargoGlobal ["DZ_LargeGunBag_EP1", 2];
_crate addBackpackCargoGlobal ["DZ_CivilBackpack_EP1", 2];

[_crate] call DZMSProtectObj;
_crate setDir -28.85478;


// ---------------------------------------------------------------


// CREATE SECOND BOX
_crate2 = createVehicle ["UralCivil2",[(_coords2 select 0),(_coords2 select 1),0],[], 0, "CAN_COLLIDE"];
_crate2 setVehicleInit " 
							this setHit [""wheel_2_3_steering"", 1];
							this setHit [""wheel_2_2_steering"", 1];
							this setHit [""wheel_1_1_steering"", 1];
							this setHit [""wheel_1_3_steering"", 1];
							this allowDamage false;
						";
clearWeaponCargoGlobal _crate2;
clearMagazineCargoGlobal _crate2;

//ARMAS PRIMARIAS
_crate2 addWeaponCargoGlobal ["SVD", 2];
_crate2 addWeaponCargoGlobal ["M14_EP1", 2];
_crate2 addWeaponCargoGlobal ["M4A3_CCO_EP1", 4];
_crate2 addWeaponCargoGlobal ["AK_107_PSO", 3];

_crate2 addMagazineCargoGlobal ["30Rnd_556x45_Stanag", 10];
_crate2 addMagazineCargoGlobal ["30Rnd_762x39_AK47", 10];
_crate2 addMagazineCargoGlobal ["20Rnd_762x51_DMR", 4];
_crate2 addMagazineCargoGlobal ["10Rnd_762x54_SVD", 5];

//PISTOLAS
_crate2 addWeaponCargoGlobal ["glock17_EP1", 2];
_crate2 addWeaponCargoGlobal ["M9", 2];
_crate2 addWeaponCargoGlobal ["MakarovSD", 2];

_crate2 addMagazineCargoGlobal ["17Rnd_9x19_glock17", 10];
_crate2 addMagazineCargoGlobal ["8Rnd_9x18_Makarov", 5];

//ITEM MÉDICO
_crate2 addMagazineCargoGlobal ["ItemBandage", 5];
_crate2 addMagazineCargoGlobal ["ItemMorphine", 5];
_crate2 addMagazineCargoGlobal ["ItemEpinephrine", 5];
_crate2 addMagazineCargoGlobal ["ItemPainkiller", 5];
_crate2 addMagazineCargoGlobal ["ItemWaterbottle", 5];
_crate2 addMagazineCargoGlobal ["FoodMRE", 5];
_crate2 addMagazineCargoGlobal ["ItemAntibiotic", 5];
_crate2 addMagazineCargoGlobal ["ItemBloodbag", 5];

//ITENS NORMAIS
_crate2 addMagazineCargoGlobal ["CinderBlocks", 8];
_crate2 addMagazineCargoGlobal ["PartGeneric", 4];
_crate2 addMagazineCargoGlobal ["ItemSandbag", 4];
_crate2 addMagazineCargoGlobal ["ItemWire", 4];
_crate2 addMagazineCargoGlobal ["30m_plot_kit", 1];

//ITEM TOOLBELT
_crate2 addWeaponCargoGlobal ["ItemToolbox", 2];
_crate2 addWeaponCargoGlobal ["ItemCrowbar", 2];
_crate2 addWeaponCargoGlobal ["ItemKnife", 2];
_crate2 addWeaponCargoGlobal ["ItemEtool", 2];
_crate2 addWeaponCargoGlobal ["ItemHatchet_DZE", 2];
_crate2 addWeaponCargoGlobal ["ItemMatchbox_DZE", 2];
_crate2 addMagazineCargoGlobal ["FlareGreen_M203", 2];
_crate2 addMagazineCargoGlobal ["FlareWhite_M203", 2];
_crate2 addMagazineCargoGlobal ["1Rnd_HE_M203", 2];
_crate2 addMagazineCargoGlobal ["FlareRed_M203", 2];
_crate2 addMagazineCargoGlobal ["Skin_GUE_Soldier_Sniper_DZ", 2];

//BACKPACKS
_crate2 addBackpackCargoGlobal ["DZ_LargeGunBag_EP1", 2];
_crate2 addBackpackCargoGlobal ["DZ_CivilBackpack_EP1", 2];

[_crate2] call DZMSProtectObj;
_crate2 setDir -28.85478;



// ---------------------------------------------------------------


// CREATE THIRD BOX
_crate3 = createVehicle ["UralCivil2",[(_coords3 select 0),(_coords3 select 1),0],[], 0, "CAN_COLLIDE"];
_crate3 setVehicleInit " 
							this setHit [""wheel_2_3_steering"", 1];
							this setHit [""wheel_2_2_steering"", 1];
							this setHit [""wheel_1_1_steering"", 1];
							this setHit [""wheel_1_3_steering"", 1];
							this allowDamage false;
						";
clearWeaponCargoGlobal _crate3;
clearMagazineCargoGlobal _crate3;

//ARMAS PRIMARIAS
_crate3 addWeaponCargoGlobal ["DMR", 1];
_crate3 addWeaponCargoGlobal ["VSS_vintorez", 2];
_crate3 addWeaponCargoGlobal ["MP5SD", 4];
_crate3 addWeaponCargoGlobal ["M4A1_HWS_GL_SD_Camo", 3];

_crate3 addMagazineCargoGlobal ["30Rnd_9x19_MP5SD", 10];
_crate3 addMagazineCargoGlobal ["30Rnd_556x45_StanagSD", 10];
_crate3 addMagazineCargoGlobal ["20Rnd_762x51_DMR", 4];
_crate3 addMagazineCargoGlobal ["20Rnd_9x39_SP5_VSS", 5];

//PISTOLAS
_crate3 addWeaponCargoGlobal ["glock17_EP1", 2];
_crate3 addWeaponCargoGlobal ["M9", 2];
_crate3 addWeaponCargoGlobal ["MakarovSD", 2];

_crate3 addMagazineCargoGlobal ["17Rnd_9x19_glock17", 10];
_crate3 addMagazineCargoGlobal ["8Rnd_9x18_Makarov", 5];

//ITEM MÉDICO
_crate3 addMagazineCargoGlobal ["ItemBandage", 5];
_crate3 addMagazineCargoGlobal ["ItemMorphine", 5];
_crate3 addMagazineCargoGlobal ["ItemEpinephrine", 5];
_crate3 addMagazineCargoGlobal ["ItemPainkiller", 5];
_crate3 addMagazineCargoGlobal ["ItemWaterbottle", 5];
_crate3 addMagazineCargoGlobal ["FoodMRE", 5];
_crate3 addMagazineCargoGlobal ["ItemAntibiotic", 5];
_crate3 addMagazineCargoGlobal ["ItemBloodbag", 5];

//ITENS NORMAIS
_crate3 addMagazineCargoGlobal ["CinderBlocks", 8];
_crate3 addMagazineCargoGlobal ["PartGeneric", 4];
_crate3 addMagazineCargoGlobal ["ItemSandbag", 4];
_crate3 addMagazineCargoGlobal ["MortarBucket", 4];
_crate3 addMagazineCargoGlobal ["ItemWire", 4];
_crate3 addMagazineCargoGlobal ["30m_plot_kit", 1];

//ITEM TOOLBELT
_crate3 addWeaponCargoGlobal ["ItemCrowbar", 2];
_crate3 addWeaponCargoGlobal ["ItemKnife", 2];
_crate3 addWeaponCargoGlobal ["ItemHatchet_DZE", 2];
_crate3 addWeaponCargoGlobal ["ItemMatchbox_DZE", 2];

//BACKPACKS
_crate3 addBackpackCargoGlobal ["DZ_LargeGunBag_EP1", 1];
_crate3 addBackpackCargoGlobal ["DZ_CivilBackpack_EP1", 1];

[_crate3] call DZMSProtectObj;
_crate3 setDir -28.85478;



// ---------------------------------------------------------------


// CREATE FORTH BOX
_crate4 = createVehicle ["UralCivil2",[(_coords4 select 0),(_coords4 select 1),0],[], 0, "CAN_COLLIDE"];
_crate4 setVehicleInit " 
							this setHit [""wheel_2_3_steering"", 1];
							this setHit [""wheel_2_2_steering"", 1];
							this setHit [""wheel_1_1_steering"", 1];
							this setHit [""wheel_1_3_steering"", 1];
							this allowDamage false;
						";
clearWeaponCargoGlobal _crate4;
clearMagazineCargoGlobal _crate4;

//ARMAS PRIMARIAS
_crate4 addWeaponCargoGlobal ["Mk_48_DZ", 1];
_crate4 addWeaponCargoGlobal ["G36_C_SD_camo", 4];
_crate4 addWeaponCargoGlobal ["M40A3", 2];

_crate4 addMagazineCargoGlobal ["5Rnd_762x51_M24", 10];
_crate4 addMagazineCargoGlobal ["30Rnd_556x45_StanagSD", 10];
_crate4 addMagazineCargoGlobal ["100Rnd_762x51_M240", 2];

//PISTOLAS
_crate4 addWeaponCargoGlobal ["glock17_EP1", 2];
_crate4 addWeaponCargoGlobal ["M9", 2];
_crate4 addWeaponCargoGlobal ["MakarovSD", 2];

_crate4 addMagazineCargoGlobal ["17Rnd_9x19_glock17", 10];
_crate4 addMagazineCargoGlobal ["8Rnd_9x18_Makarov", 5];

//ITEM MÉDICO
_crate4 addMagazineCargoGlobal ["ItemBandage", 5];
_crate4 addMagazineCargoGlobal ["ItemMorphine", 5];
_crate4 addMagazineCargoGlobal ["ItemEpinephrine", 5];
_crate4 addMagazineCargoGlobal ["ItemPainkiller", 5];
_crate4 addMagazineCargoGlobal ["ItemWaterbottle", 5];
_crate4 addMagazineCargoGlobal ["FoodMRE", 5];
_crate4 addMagazineCargoGlobal ["ItemAntibiotic", 5];
_crate4 addMagazineCargoGlobal ["ItemBloodbag", 5];

//ITENS NORMAIS
_crate4 addMagazineCargoGlobal ["CinderBlocks", 8];
_crate4 addMagazineCargoGlobal ["PartGeneric", 4];
_crate4 addMagazineCargoGlobal ["ItemSandbag", 4];
_crate4 addMagazineCargoGlobal ["MortarBucket", 4];
_crate4 addMagazineCargoGlobal ["ItemWire", 4];
_crate4 addMagazineCargoGlobal ["30m_plot_kit", 1];

//ITEM TOOLBELT
_crate4 addWeaponCargoGlobal ["ItemCrowbar", 2];
_crate4 addWeaponCargoGlobal ["ItemKnife", 2];
_crate4 addWeaponCargoGlobal ["ItemHatchet_DZE", 2];
_crate4 addWeaponCargoGlobal ["ItemMatchbox_DZE", 2];

//BACKPACKS
_crate4 addBackpackCargoGlobal ["DZ_LargeGunBag_EP1", 1];
_crate4 addBackpackCargoGlobal ["DZ_CivilBackpack_EP1", 1];

[_crate4] call DZMSProtectObj;
_crate4 setDir -28.85478; 

 

-Repack your dayz_server pbo and run the server.

-This will create 4 Ural with loot in 8 possible locations in Sector B.

-If you want them to spawn always on the same coord, you should replace this line:

_crate4 = createVehicle ["UralCivil2",[(_coords4 select 0),(_coords4 select 1),0],[], 0, "CAN_COLLIDE"]; 

with this:

_crate4 = createVehicle ["UralCivil2",[X,Y,Z],[], 0, "CAN_COLLIDE"]; 

and change the X,Y,Z with the actual coordinate.

 

-If you want them to spawn with wheels remove these lines:

_crate4 setVehicleInit " 
			this setHit [""wheel_2_3_steering"", 1];
			this setHit [""wheel_2_2_steering"", 1];
			this setHit [""wheel_1_1_steering"", 1];
			this setHit [""wheel_1_3_steering"", 1];
			this allowDamage false;
		";

To change/remove/add items from the Ural, you need to play around with these lines:

_crate4 addBackpackCargoGlobal ["DZ_CivilBackpack_EP1", 1];
_crate4 addWeaponCargoGlobal ["ItemHatchet_DZE", 2];
_crate4 addMagazineCargoGlobal ["ItemSandbag", 4];
_crate4 addWeaponCargoGlobal ["Mk_48_DZ", 1];

Note: If you change some of these things, you need to pay attention, because there is 4 blocks of code, 1 for each Ural. If you want to change the 4, you need to change the 4 blocks of codes.

Link to comment
Share on other sites

  • 0

the Urals are in, but I cant get the world loot to spawn been in EleKtro and Cherno for a while and nothing spawns, I'm about to put the std Variables.sqf back in (so players will die if they enter the Urals) to see if I can get the loot working.

 

I guess ill have to just put a notice on the loading screen to tell them not to get in them lol

Link to comment
Share on other sites

  • 0

call compile preprocessFileLineNumbers "custom\variables.sqf";   = No Loot in any buildings and very few zombies - Drive Ural around and smile 

call compile preprocessFileLineNumbers \z\addons\dayz_code\init\variables.sqf -- was original text = Loot in all buildings and zombies - Drive Ural 0.0009mm and get killed :/

Link to comment
Share on other sites

  • 0

call compile preprocessFileLineNumbers "custom\variables.sqf";   = No Loot in any buildings and very few zombies - Drive Ural around and smile

call compile preprocessFileLineNumbers \z\addons\dayz_code\init\variables.sqf -- was original text = Loot in all buildings and zombies - Drive Ural 0.0009mm and get killed :/

Well.. i don't know what you are doing.. but i didn't changed anything in the variables, except for this: DZE_safeVehicle = ["ParachuteWest","ParachuteC","UralCivil2"];

Then i just did those steps i sent you already.

 

Try to redo everything from the beggining, and do what i said.

 

Sorry, but i'm out of solutions for you, i don't understand scripts that much to think in something else. Hope someone else can help you =D

Link to comment
Share on other sites

  • 0

what would cause this not to spawn the Urals?

 

 

 

private ["_crate","_crate2","_crate3"];


DZMSProtectObj = {
    private ["_object","_objectID"];
    _object = _this select 0;
    
    _objectID = str(round(random 999999));
    _object setVariable ["ObjectID", _objectID, true];
    _object setVariable ["ObjectUID", _objectID, true];
    
    if (_object isKindOf "ReammoBox") then {
        // PermaLoot on top of ObjID because that "arma logic"
        _object setVariable ["permaLoot",true];
        _object setVariable ["Mission", "1", true];
    };
};


.
_coords = [[22262.3,19940.2,0.00144],[22199.5,19851.1,0.00144],[22159.4,19838.2,0.00144],[22155.9,19919.5,0.00144]] call BIS_fnc_selectRandom; // Guns
_coords2 = [[22660.7,19643.2,0.00144],[22695.5,19511.3,0.00144],[22759.1,19622,0.00144],[22542.4,19864,0.00144]] call BIS_fnc_selectRandom; // Build
_coords3 = [[22401.6,19189.2,0.00144],[22024.5,19689.8,0.0144]] call BIS_fnc_selectRandom; // Food

// Guns
_crate = createVehicle ["UralCivil2",[(_coords select 0),(_coords select 1),0],[], 0, "CAN_COLLIDE"];
_crate setVehicleInit "
                            this setHit [""wheel_2_3_steering"", 1];
                            this setHit [""wheel_1_3_steering"", 1];
                            this allowDamage false;
                        ";
clearWeaponCargoGlobal _crate;
clearMagazineCargoGlobal _crate;

//GUNS

_crate addWeaponCargoGlobal ["m107_DZ", 1];
_crate addWeaponCargoGlobal ["FN_FAL_ANPVS4", 2];
_crate addWeaponCargoGlobal ["AKS_74_UN_kobra", 4];
_crate addWeaponCargoGlobal ["RPG7V", 1];
_crate addWeaponCargoGlobal ["SCAR_H_LNG_Sniper", 1];
_crate addWeaponCargoGlobal ["BAF_AS50_scoped", 1];
_crate addWeaponCargoGlobal ["SCAR_L_STD_EGLM_TWS", 2];
_crate addWeaponCargoGlobal ["KSVK", 1];
_crate addWeaponCargoGlobal ["M24", 4];
_crate addWeaponCargoGlobal ["M249_TWS_EP1", 2];
_crate addWeaponCargoGlobal ["SVD_NSPU_EP1", 2];

_crate addMagazineCargoGlobal ["10Rnd_127x99_m107", 6];
_crate addMagazineCargoGlobal ["20Rnd_762x51_FNFAL", 20];
_crate addMagazineCargoGlobal ["30Rnd_545x39_AKSD", 40];
_crate addMagazineCargoGlobal ["PG7V", 3];
_crate addMagazineCargoGlobal ["20Rnd_762x51_B_SCAR", 6];
_crate addMagazineCargoGlobal ["5Rnd_127x99_as50", 6];
_crate addMagazineCargoGlobal ["30Rnd_556x45_Stanag", 20];
_crate addMagazineCargoGlobal ["200Rnd_556x45_M249", 5];
_crate addMagazineCargoGlobal ["10Rnd_762x54_SVD", 10];
_crate addMagazineCargoGlobal ["5Rnd_127x108_KSVK", 20];
_crate addMagazineCargoGlobal ["5Rnd_762x51_M24", 10];

//ITEM MEDIC

//ITENS BUILD
_crate addMagazineCargoGlobal ["MortarBucket", 15];
_crate addMagazineCargoGlobal ["CinderBlocks", 30];

//ITEM TOOLBELT

//BACKPACKS
_crate addBackpackCargoGlobal ["DZ_LargeGunBag_EP1", 4];
_crate addBackpackCargoGlobal ["US_Patrol_Pack_EP1", 2];
_crate addBackpackCargoGlobal ["US_Assault_Pack_EP1", 2];

[_crate] call DZMSProtectObj;
_crate setDir -178.85478;


// ---------------------------------------------------------------


// Build
_crate2 = createVehicle ["UralCivil2",[(_coords2 select 0),(_coords2 select 1),0],[], 0, "CAN_COLLIDE"];
_crate2 setVehicleInit "
                            this setHit [""wheel_2_3_steering"", 1];
                            this setHit [""wheel_2_2_steering"", 1];
                            this allowDamage false;
                        ";
clearWeaponCargoGlobal _crate2;
clearMagazineCargoGlobal _crate2;

//GUNS
//ITEM MEDIC

//ITENS BUILD
_crate2 addMagazineCargoGlobal ["PartGlass", 5];
_crate2 addMagazineCargoGlobal ["PartWheel", 5];
_crate2 addMagazineCargoGlobal ["ItemFuelBarrel", 5];
_crate2 addMagazineCargoGlobal ["PartFueltank", 5];
_crate2 addMagazineCargoGlobal ["PartEngine", 5];
_crate2 addMagazineCargoGlobal ["cinder_wall_kit", 30];
_crate2 addMagazineCargoGlobal ["MortarBucket", 15];
_crate2 addMagazineCargoGlobal ["CinderBlocks", 60];
_crate2 addMagazineCargoGlobal ["cinder_garage_kit", 10];
_crate2 addMagazineCargoGlobal ["ItemComboLock", 5];
_crate2 addMagazineCargoGlobal ["ItemWoodLadder", 10];
_crate2 addMagazineCargoGlobal ["ItemWoodStairs", 10];
_crate2 addMagazineCargoGlobal ["metal_floor_kit", 30];

//ITEM TOOLBELT
_crate2 addWeaponCargoGlobal ["ItemToolbox", 10];
_crate2 addWeaponCargoGlobal ["ItemCrowbar", 10];

//BACKPACKS
_crate2 addBackpackCargoGlobal ["DZ_LargeGunBag_EP1", 6];
_crate2 addBackpackCargoGlobal ["US_Patrol_Pack_EP1", 2];

[_crate2] call DZMSProtectObj;
_crate2 setDir -11.25478;



// ---------------------------------------------------------------


// Food and Meds
_crate3 = createVehicle ["UralOpen_CDF",[(_coords3 select 0),(_coords3 select 1),0],[], 0, "CAN_COLLIDE"];
_crate3 setVehicleInit "
                            this setHit [""wheel_1_1_steering"", 1];
                            this setHit [""wheel_1_3_steering"", 1];
                            this allowDamage false;
                        ";
clearWeaponCargoGlobal _crate3;
clearMagazineCargoGlobal _crate3;

//GUNS
_crate3 addWeaponCargoGlobal ["AK_107_GL_pso", 3];
_crate3 addWeaponCargoGlobal ["UZI_SD_EP1", 3];

_crate3 addMagazineCargoGlobal ["30Rnd_545x39_AK", 9];
_crate3 addMagazineCargoGlobal ["30Rnd_9x19_UZI_SD", 9];

//ITEM MEDIC
_crate3 addMagazineCargoGlobal ["ItemBandage", 20];
_crate3 addMagazineCargoGlobal ["ItemMorphine", 20];
_crate3 addMagazineCargoGlobal ["ItemEpinephrine", 10];
_crate3 addMagazineCargoGlobal ["ItemPainkiller", 20];
_crate3 addMagazineCargoGlobal ["ItemAntibiotic", 10];
_crate3 addMagazineCargoGlobal ["ItemBloodbag", 10];

//ITEMS FOOD
_crate3 addMagazineCargoGlobal ["NVGoggles", 6];
_crate3 addMagazineCargoGlobal ["FoodSteakCooked", 30];
_crate3 addMagazineCargoGlobal ["ItemSodaPepsi", 30];

//ITEM TOOLBELT
_crate3 addMagazineCargoGlobal ["Skin_GUE_Soldier_Sniper_DZ", 8];

//BACKPACKS
_crate3 addBackpackCargoGlobal ["DZ_CivilBackpack_EP1", 4];
_crate3 addBackpackCargoGlobal ["US_Patrol_Pack_EP1", 4];

[_crate3] call DZMSProtectObj;
_crate3 setDir -132.85478;
 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...