z1218beast
New Member
Hello I am wondering if I can make certain vehicles re-spawn at restart? Dose anyone have a script for that or know how to get that? Thanks in Advance
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
activateAddons [
"dayz_vehicles"
];
activateAddons ["dayz_vehicles"];
initAmbientLife;
_this = createCenter west;
_center_0 = _this;
_group_0 = createGroup _center_0;
_unit_0 = objNull;
if (true) then
{
_this = _group_0 createUnit ["Bandit1_DZ", [109.83083, 1595.2533, 0], [], 0, "CAN_COLLIDE"];
_unit_0 = _this;
_this setUnitAbility 0.60000002;
if (true) then {_group_0 selectLeader _this;};
if (true) then {selectPlayer _this;};
};
if (isServer) then {
processInitCommands;
runInitScript;
finishMissionInit;
_vehicle_125 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [13089.339, 10291.344, 2.6702881e-005], [], 0, "CAN_COLLIDE"];
_vehicle_125 = _this;
_this setPos [13089.339, 10291.344, 2.6702881e-005];
};
}; <===== Add This
server_spawnCrashSite = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";
[] execVM "\z\addons\dayz_server\Buildings\Taxis.sqf";
if (isServer) then {
_vehicle_2 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [738.67548, 1885.6089, -6.6757202e-006], [], 0, "CAN_COLLIDE"];
_vehicle_2 = _this;
_this setDir 51.440807;
_this setPos [738.67548, 1885.6089, -6.6757202e-006];
};
_vehicle_6 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [1698.5905, 2197.3474, 3.8146973e-006], [], 0, "CAN_COLLIDE"];
_vehicle_6 = _this;
_this setDir 109.65331;
_this setPos [1698.5905, 2197.3474, 3.8146973e-006];
};
_vehicle_11 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [2759.6497, 2005.2544, 1.0490417e-005], [], 0, "CAN_COLLIDE"];
_vehicle_11 = _this;
_this setDir 84.41227;
_this setPos [2759.6497, 2005.2544, 1.0490417e-005];
};
_vehicle_16 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [3802.4829, 2583.9788, 2.4318695e-005], [], 0, "CAN_COLLIDE"];
_vehicle_16 = _this;
_this setDir 149.01744;
_this setPos [3802.4829, 2583.9788, 2.4318695e-005];
};
_vehicle_20 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [4883.6416, 2292.0439, 2.3841858e-006], [], 0, "CAN_COLLIDE"];
_vehicle_20 = _this;
_this setDir 120.52782;
_this setPos [4883.6416, 2292.0439, 2.3841858e-006];
};
_vehicle_25 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [6193.9766, 2100.3113, -1.4305115e-006], [], 0, "CAN_COLLIDE"];
_vehicle_25 = _this;
_this setDir 45.098427;
_this setPos [6193.9766, 2100.3113, -1.4305115e-006];
};
_vehicle_43 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [7103.8047, 2174.4094, -7.1525574e-006], [], 0, "CAN_COLLIDE"];
_vehicle_43 = _this;
_this setPos [7103.8047, 2174.4094, -7.1525574e-006];
};
_vehicle_44 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [7001.6553, 2800.6548, 3.3855438e-005], [], 0, "CAN_COLLIDE"];
_vehicle_44 = _this;
_this setPos [7001.6553, 2800.6548, 3.3855438e-005];
};
_vehicle_50 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [6699.5181, 2997.9763, 8.9168549e-005], [], 0, "CAN_COLLIDE"];
_vehicle_50 = _this;
_this setDir 60.952045;
_this setPos [6699.5181, 2997.9763, 8.9168549e-005];
};
_vehicle_55 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [7682.3325, 3220.0525, 6.1511993e-005], [], 0, "CAN_COLLIDE"];
_vehicle_55 = _this;
_this setDir 103.19455;
_this setPos [7682.3325, 3220.0525, 6.1511993e-005];
};
_vehicle_60 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [8630.7715, 2598.4631, 7.8678131e-005], [], 0, "CAN_COLLIDE"];
_vehicle_60 = _this;
_this setDir 158.54411;
_this setPos [8630.7715, 2598.4631, 7.8678131e-005];
};
_vehicle_65 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [9395.9766, 1911.0852, 7.3432922e-005], [], 0, "CAN_COLLIDE"];
_vehicle_65 = _this;
_this setDir 120.48695;
_this setPos [9395.9766, 1911.0852, 7.3432922e-005];
};
_vehicle_71 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [10208.447, 2114.877, -2.8610229e-006], [], 0, "CAN_COLLIDE"];
_vehicle_71 = _this;
_this setPos [10208.447, 2114.877, -2.8610229e-006];
};
_vehicle_74 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [9955.5322, 1633.0813, 4.196167e-005], [], 0, "CAN_COLLIDE"];
_vehicle_74 = _this;
_this setDir 73.324432;
_this setPos [9955.5322, 1633.0813, 4.196167e-005];
};
_vehicle_86 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [10828.481, 2324.3542, 0.00031852722], [], 0, "CAN_COLLIDE"];
_vehicle_86 = _this;
_this setPos [10828.481, 2324.3542, 0.00031852722];
};
_vehicle_90 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [11092.255, 3096.1494, 0.00016021729], [], 0, "CAN_COLLIDE"];
_vehicle_90 = _this;
_this setPos [11092.255, 3096.1494, 0.00016021729];
};
_vehicle_98 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [12843.266, 3697.4448, -0.00011348724], [], 0, "CAN_COLLIDE"];
_vehicle_98 = _this;
_this setPos [12843.266, 3697.4448, -0.00011348724];
};
_vehicle_102 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [13507.997, 4634.5259, 6.3896179e-005], [], 0, "CAN_COLLIDE"];
_vehicle_102 = _this;
_this setPos [13507.997, 4634.5259, 6.3896179e-005];
};
_vehicle_110 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [13455.646, 6400.0952, 2.2888184e-005], [], 0, "CAN_COLLIDE"];
_vehicle_110 = _this;
_this setPos [13455.646, 6400.0952, 2.2888184e-005];
};
_vehicle_116 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [13060.004, 7709.832, 0.00014352798], [], 0, "CAN_COLLIDE"];
_vehicle_116 = _this;
_this setPos [13060.004, 7709.832, 0.00014352798];
};
_vehicle_120 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [12829.105, 8859.3232, 1.6212463e-005], [], 0, "CAN_COLLIDE"];
_vehicle_120 = _this;
_this setPos [12829.105, 8859.3232, 1.6212463e-005];
};
_vehicle_122 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [12917.891, 9513.377, 0.00010156631], [], 0, "CAN_COLLIDE"];
_vehicle_122 = _this;
_this setPos [12917.891, 9513.377, 0.00010156631];
};
_vehicle_125 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [13089.339, 10291.344, 2.6702881e-005], [], 0, "CAN_COLLIDE"];
_vehicle_125 = _this;
_this setPos [13089.339, 10291.344, 2.6702881e-005];
};
};
Here's how I do it on my server:
_vehicle_11 = objNull;
if (true) then
{
_this = createVehicle ["Lada2_TK_CIV_EP1", [2759.6497, 2005.2544, 1.0490417e-005], [], 0, "CAN_COLLIDE"];
_vehicle_11 = _this;
_this setDir 84.41227;
_this setPos [2759.6497, 2005.2544, 1.0490417e-005];
_this setVariable ["Sarge",1,true];
};
if(vehicle _x != _x && (vehicle _x getVariable [""Sarge"",0] != 1) && !(vehicle _x in _safety) && (isPlayer _x) && !((typeOf vehicle _x) in DZE_safeVehicle)) then {" \n
if (_object getVariable "Sarge" == 1) exitWith {};