Is there a how to do step by step for this script?
To get the code working in the two .sqf files in post #17 of this thread, do the following.
Disclaimer: I am certain that there is a more efficient method to do this, however I freely admit that I am deep in the learning phase, versus the actual coding one. Use this at your own risk:
1. Using Joikd's code from post #17, and Notepad++ create two new .sqf files. Name the first
player_spawnCheck.sqf and paste Joikd's player_spawnCheck code from that post into it. Save it into your server mission .pbo /fixes folder. Name second
building_spawnZombies.
sqf and paste his code into it and save it in the same folder.
2. Now open up the DayZ Code .pbo for the DayZ mod you are running which is found in your Arma2OA folder on your computer. Navigate to the compiles folder and find
fn_selfActions.sqf. Open that file and copy everything. Open the player_spawnCheck.sqf you just created, and find this line at the very end and make it look like this:
All you are doing is adding a semicolon after
_nearby so no big deal.
3. Now skip a few lines after
_nearby; and pase the ENTIRE fn_selfActions.sqf into your player_spawnCheck.sqf. Save the file.
4. Open your server mission .pbo init.sqf and around the bottom of the file you will find an
if (!isDedicated) then { statement. Place the following WITHIN that statement so it looks like this:
Code:
if (!isDedicated) then {
fnc_usec_selfActions = compile preprocessFileLineNumbers "fixes\player_spawnCheck.sqf";
0 fadeSound 0;
0 cutText [(localize "STR_AUTHENTICATING"), "BLACK FADED",60];
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
};
**All you're adding is the part that begins with fnc_usec
5. Next find this line in your server mission init.sqf:
Code:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile regular functions
progressLoadingScreen 1.0;
make that look like this:
Code:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile regular functions
building_spawnZombies = compile preprocessFileLineNumbers "fixes\building_spawnZombies.sqf";
progressLoadingScreen 1.0;
6. Save your init.sqf, repack your mission .pbo and you are finished.
**for those who have already moved your fn_selfActions.sqf to your server mission folder, I don't know if you will be able to do this without breaking other scripts that require that. Sorry.