Jump to content
  • 0

What is wrong with this..


Desire

Question

7 answers to this question

Recommended Posts

  • 0

here is a tiny cut-out of something i made for my server - it only includes the starting code, 1 object and the end code. but that's all the example you need. this is the mission.sqf file saved in user missions.

activateAddons [ 
  "map_eu"
];

activateAddons ["map_eu"];
initAmbientLife;

_this = createCenter west;
_center_0 = _this;

_group_0 = createGroup _center_0;

_unit_0 = objNull;
if (true) then
{
  _this = _group_0 createUnit ["BAF_Soldier_AA_W", [14675.053, 16635.396], [], 0, "CAN_COLLIDE"];
  _unit_0 = _this;
  _this setUnitAbility 0.60000002;
  if (true) then {_group_0 selectLeader _this;};
  if (true) then {selectPlayer _this;};
  if (true) then {setPlayable _this;};
};

_vehicle_23 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Mil_Barracks_i", [14676.693, 16651.602, -0.00017356873], [], 0, "CAN_COLLIDE"];
  _vehicle_23 = _this;
  _this setPos [14676.693, 16651.602, -0.00017356873];
};

processInitCommands;
runInitScript;
finishMissionInit;

you need to delete all code that comes above the first '_vehicle_XX' line. then delete the last 3 lines.

save it, put it somewhere on your server files, not your mission file. Example would be "\z\addons\dayz_server\MapAdditions\example.sqf";

 

now open up your 'server_functions.sqf' file and at the very bottom put

[] ExecVM "\z\addons\dayz_server\MapAdditions\example.sqf";

save all the work, start up your server and it will be on your map waiting for you :)

Link to comment
Share on other sites

  • 0

here is a tiny cut-out of something i made for my server - it only includes the starting code, 1 object and the end code. but that's all the example you need. this is the mission.sqf file saved in user missions.

activateAddons [ 
  "map_eu"
];

activateAddons ["map_eu"];
initAmbientLife;

_this = createCenter west;
_center_0 = _this;

_group_0 = createGroup _center_0;

_unit_0 = objNull;
if (true) then
{
  _this = _group_0 createUnit ["BAF_Soldier_AA_W", [14675.053, 16635.396], [], 0, "CAN_COLLIDE"];
  _unit_0 = _this;
  _this setUnitAbility 0.60000002;
  if (true) then {_group_0 selectLeader _this;};
  if (true) then {selectPlayer _this;};
  if (true) then {setPlayable _this;};
};

_vehicle_23 = objNull;
if (true) then
{
  _this = createVehicle ["MAP_Mil_Barracks_i", [14676.693, 16651.602, -0.00017356873], [], 0, "CAN_COLLIDE"];
  _vehicle_23 = _this;
  _this setPos [14676.693, 16651.602, -0.00017356873];
};

processInitCommands;
runInitScript;
finishMissionInit;

you need to delete all code that comes above the first '_vehicle_XX' line. then delete the last 3 lines.

save it, put it somewhere on your server files, not your mission file. Example would be "\z\addons\dayz_server\MapAdditions\example.sqf";

 

now open up your 'server_functions.sqf' file and at the very bottom put

[] ExecVM "\z\addons\dayz_server\MapAdditions\example.sqf";

save all the work, start up your server and it will be on your map waiting for you :)

Yeah, Thanks man :) I figured out that I left some code that prevented it from loading.. It works now though. is there a reason why items aren't spawning in the new buildings I placed?

Link to comment
Share on other sites

  • 0

 

open the SQF file for that map edit you made and find all the buildings that aren;t spawning loot and change their prefix from

MAP_

to

LAND_

Thank you! Last question, how would I get coordinates like this 10948.426,-10.727827,654.90265  So that I can add custom map markers?

Link to comment
Share on other sites

  • 0

i'm assuming that the map markers will be for the new area you made for the server.

 

one way is to find a building you placed that's centrally placed (or close to) in the new area then find that object in the SQF file and the coords will look either like -

[14676.693, 16651.602, -0.00017356873]

or -

[14676.693, 16651.602]

So, if they look like the first set you need to swap the middle number and the most right number around so it would look like -

[14676.693, -0.00017356873, 16651.602]

And if they look like the second set you just need to add a 0 in the middle of them so it would look like -

[14676.693, 0, 16651.602]

And there is the coordinates you need :)

Link to comment
Share on other sites

  • 0

i'm assuming that the map markers will be for the new area you made for the server.

 

one way is to find a building you placed that's centrally placed (or close to) in the new area then find that object in the SQF file and the coords will look either like -

[14676.693, 16651.602, -0.00017356873]

or -

[14676.693, 16651.602]

So, if they look like the first set you need to swap the middle number and the most right number around so it would look like -

[14676.693, -0.00017356873, 16651.602]

And if they look like the second set you just need to add a 0 in the middle of them so it would look like -

[14676.693, 0, 16651.602]

And there is the coordinates you need :)

Thank you! it worked like a charm!

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...