Follow this and Download the fixes file below. Halo Spawn for New Players, or Respawn only and saving. All original code credits to the OP. Just played with it a bit to fix some things.
Let's Start with the Server:
dayz_server.pbo>>complie>>server_playerSetup.sqf
Find:
Code:
dayzPlayerLogin2 = [_worldspace,_state];
Change to:
Code:
dayzPlayerLogin2 = [_worldspace,_state,_randomSpot];
And now the Mission:
dayz_X.chernarus>>init.sqf
(X represents your instance ID)
At the bottom ADD:
Code:
MC_BIS_halo_spawn = compile preprocessFileLineNumbers "fixes\haloInit.sqf";
private["_mkr"];
_mkr = "spawn" + str(round(random 4));
if (!isDedicated) then {
[] spawn {
waitUntil { !isNil ("dayz_Totalzedscheck") and
!(player getVariable ["humanity",0] > 5000 and
typeOf player == "Survivor2_DZ") and
!(player getVariable ["humanity",0] < -2000 and
(typeOf player == "Survivor2_DZ" or
typeOf player == "SurvivorW2_DZ") ) and
!(player getVariable ["humanity",0] > 0 and
(typeOf player == "Bandit1_DZ" or
typeOf player == "BanditW1_DZ") )
};
if (dayzPlayerLogin2 select 2) then
{
_pos = position player;
_mkr setMarkerPos [_pos select 0, _pos select 1];
player spawn MC_BIS_halo_spawn;
};
};
};
Here is where you have 2 options.
Option #1: Use the fn_HALO.sqf that the OP provided and no BE changes need to be made. If you choose this option do this:
dayz_X.chernarus.pbo>>fixes>>haloInit.sqf
(X represents your instance ID)
Change this:
Code:
if (!isDedicated) then {
[player, 1000] exec "ca\air2\halo\data\Scripts\HALO_init.sqs";
};
To this:
Code:
if (!isDedicated) then {
[player, 1000] execVM "fixes\fn_HALO.sqf";
};
Option #2: Leave the haloInit.sqf as is and it will work. I chose to do HALO Spawn with the existing files in ARMA 2 OA. I had to change some CreateVehicle filters and few other things but it works Your choice.
If you choose #2 make sure to do the following.
Profile Path
dayz_X.chernarus>>Battleye>>creatvehicle.txt
(X representing your instance ID)
Find:
Code:
5 "Parachute" !="ParachuteWest"//under monitoring
Change T0:
Code:
5 "Parachute" !="ParachuteWest" !"ParachuteEast" !"ParachuteG" !"ParachuteC"//under monitoring
dayz_server.pbo>>compile>>server_updateObject.sqf
Find this:
Code:
if (!_parachuteWest) then {
if (_objectID == "0" && _uid == "0") then
{
_object_position = getPosATL _object;
diag_log(format["Deleting object %1 with invalid ID at pos [%2,%3,%4]",
typeOf _object,
_object_position select 0,
_object_position select 1,
_object_position select 2]);
_isNotOk = true;
};
};
Change To (Comment Out)
Code:
/*
if (!_parachuteWest) then {
if (_objectID == "0" && _uid == "0") then
{
_object_position = getPosATL _object;
diag_log(format["Deleting object %1 with invalid ID at pos [%2,%3,%4]",
typeOf _object,
_object_position select 0,
_object_position select 1,
_object_position select 2]);
_isNotOk = true;
};
};
*/
FROM THE OP:
Now we need to fix the anti-teleport issue in 1.7.6.1 so:
Find player_monitor.fsm in your @DayZ folder (C:\Program Files (x86)\Steam\steamapps\common\arma 2 operation arrowhead\@DayZ\Addons\dayz_code\system) --- you must unpack your dayz_code.pbo to see the file ---
Place that file (player_monitor.fsm) in your fixes folder as well.
Edit it, and find:
Code:
"[] execVM ""\z\addons\dayz_code\system\antihack.sqf"";" \n
Now replace it with:
Code:
// "[] execVM ""\z\addons\dayz_code\system\antihack.sqf"";" \n
Open init.sqf and find:
Code:
_playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
Replace it with:
Code:
_playerMonitor = [] execFSM "fixes\player_monitor.fsm";
Repack and upload! Enjoy!
I think that's it. The reason Saving was not working is "respawn_west" is designated as Debug and thus the server thinks you are still there. I made it so all HALO spawns are based on the 4 (Chernarus) spawns.
I will probably change the Z axis of the spawns so players dont Flash in on the coast and then disappear to the HALO height. Not a huge issue.
Also, if you want to change the height of the "fall":
dayz_X.chernarus.pbo>>fixes>>haloInit.sqf
Change 1000 to whatever height you want.
Code:
if (!isDedicated) then {
[player, 1000] exec "ca\air2\halo\data\Scripts\HALO_init.sqs";
};
if you use option 2 and dont already have the below changed, do this:
dayz_serber.pbo>>system>>server_cleanup.fsm
COMMENT OUT THE WHOLE BLOCK
Code:
"Check for hackers" \n
" {" \n
" if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
" diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n
" (vehicle _x) setDamage 1;" \n
" _x setDamage 1;" \n
" };" \n
" } forEach allUnits;" \n
Keep in mind this is for Chernarus Only. Modifications to the mission init.sqf will need to be made for other maps per their spawns.
Any issues let me know.
DOWNLOAD FIXES FOLDER!!!!
FIXES.RAR