Achmed Posted July 30, 2013 Report Share Posted July 30, 2013 None of this code is my own, i have simply combined the code from http://opendayz.net/threads/safe-zone-with-god-mode-for-all-players.12237/ with the original epoch code. All credit goes to the original code developers Make a folder called "safezones" in the root of your mission.pbo create 3 files in the safezones folder called "safezone_stary.sqf", "safezone_bash.sqf" and "safezone_klen.sqf" in the file called "safezone_stary.sqf" paste this code //Mod by Zane Private ["_Basis","_EH_Fired","_EH_Hit","_EH_Killed"]; _Basis = _this select 0; //Basisname while {true} do { waitUntil {vehicle player in list _Basis}; titleText ["Welcome to trader city Stary, God mode ON.", "PLAIN DOWN", 3]; sleep 2; player setUnitRecoilCoefficient 0; player_zombieCheck = {}; fnc_usec_damageHandler = {}; fnc_usec_unconscious = {}; player allowDamage false; waitUntil {! (vehicle player in list _Basis)}; titleText ["Leaving trader city Stary, God mode OFF.", "PLAIN DOWN", 3]; sleep 2; player setUnitRecoilCoefficient 1; player_zombieCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf"; fnc_usec_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf"; fnc_usec_unconscious = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_unconscious.sqf"; player allowDamage true; } in the file called "safezone_bash.sqf" paste this code //Mod by Zane Private ["_Basis","_EH_Fired","_EH_Hit","_EH_Killed"]; _Basis = _this select 0; //Basisname while {true} do { waitUntil {vehicle player in list _Basis}; titleText ["Welcome to trader city Bash, God mode ON.", "PLAIN DOWN", 3]; sleep 2; player setUnitRecoilCoefficient 0; player_zombieCheck = {}; fnc_usec_damageHandler = {}; fnc_usec_unconscious = {}; player allowDamage false; waitUntil {! (vehicle player in list _Basis)}; titleText ["Leaving trader city Bash, God mode OFF.", "PLAIN DOWN", 3]; sleep 2; player setUnitRecoilCoefficient 1; player_zombieCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf"; fnc_usec_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf"; fnc_usec_unconscious = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_unconscious.sqf"; player allowDamage true; } in the file called "safezone_klen.sqf" paste this code //Mod by Zane Private ["_Basis","_EH_Fired","_EH_Hit","_EH_Killed"]; _Basis = _this select 0; //Basisname while {true} do { waitUntil {vehicle player in list _Basis}; titleText ["Welcome to trader city Klen, God mode ON.", "PLAIN DOWN", 3]; sleep 2; player setUnitRecoilCoefficient 0; player_zombieCheck = {}; fnc_usec_damageHandler = {}; fnc_usec_unconscious = {}; player allowDamage false; waitUntil {! (vehicle player in list _Basis)}; titleText ["Leaving trader city Klen, God mode OFF.", "PLAIN DOWN", 3]; sleep 2; player setUnitRecoilCoefficient 1; player_zombieCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf"; fnc_usec_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf"; fnc_usec_unconscious = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_unconscious.sqf"; player allowDamage true; } Open your mission.sqm file and find "class sensors". It will be at around line 1300 Replace everything from "class sensors" to just before "class intro" with class Sensors { items=3; class Item0 { position[]={6325.6772,304.99033,7807.7412}; a=100; b=100; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; text="Basis_West_Stary"; name="Basis_West_Stary"; expCond="(player distance Basis_West_Stary) < 100;"; expActiv="if (playerSide == WEST) then {[Basis_West_Stary] execVM ""safezones\safezone_stary.sqf""}; canbuild = false;"; expDesactiv="canbuild = true;"; class Effects { }; }; class Item1 { position[]={4063.4226,365.00577,11664.19}; a=100; b=100; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; text="Basis_West_Bash"; name="Basis_West_Bash"; expCond="(player distance Basis_West_Bash) < 100;"; expActiv="if (playerSide == WEST) then {[Basis_West_Bash] execVM ""safezones\safezone_bash.sqf""}; canbuild = false;"; expDesactiv="canbuild = true;"; class Effects { }; }; class Item2 { position[]={11447.472,317.26886,11364.504}; a=100; b=100; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; text="Basis_West_Klen"; name="Basis_West_Klen"; expCond="(player distance Basis_West_Klen) < 100;"; expActiv="if (playerSide == WEST) then {[Basis_West_Klen] execVM ""safezones\safezone_klen.sqf""}; canbuild = false;"; expDesactiv="canbuild = true;"; class Effects { }; }; }; }; repack your pbo and upload. Link to comment Share on other sites More sharing options...
Adminlaststand Posted July 30, 2013 Report Share Posted July 30, 2013 Nicely timed post mathew , at this very moment i'm trying to work out the very same thing using the same script. Idk, but i'll be watching the thread. i'll try your script on our server A Link to comment Share on other sites More sharing options...
Achmed Posted July 30, 2013 Author Report Share Posted July 30, 2013 i have tried it slightly different and at the moment im getting no loot or zombies..... back to the drawing board :( Link to comment Share on other sites More sharing options...
Adminlaststand Posted July 30, 2013 Report Share Posted July 30, 2013 class Sensors{items=1;class Item0{position[]={6325.6772,304.99033,7807.7412}; a=100; <-------size b=100; <-------size activationBy="WEST"; repeating=1; interruptable=1; age="UNKNOWN"; name="zonestary"; expCond="(player distance zonestary) < 100;"; <-----size expActiv="if (playerSide == WEST) then {[basis_West] execVM ""safezone.sqf""}; TitleText[""Now entering trader city Stary"",""PLAIN DOWN"]; canbuild = false;"; expDesactiv="TitleText[""Now leaving trader city Stary"",""PLAIN DOWN""]; canbuild = true;"; class Effects { };};}; I did notice the bits in red might be conflicting with each other i think the top 2 set size of the dome/area, and the bottom one too. Maybe 1 or other not both A Link to comment Share on other sites More sharing options...
Achmed Posted July 30, 2013 Author Report Share Posted July 30, 2013 that's how it is in the default epoch file. give me 2 min as i think i have it sorted. the only problem i have now is that its possible to log out while in the trader city but this could be down to my antihack so just going to disable it and see if it happens still. Link to comment Share on other sites More sharing options...
Achmed Posted July 30, 2013 Author Report Share Posted July 30, 2013 ok that bug is down to my antihack so looks like i have got it working, just need to enable it for the other trader citys and then ill post the code if all ok Link to comment Share on other sites More sharing options...
Achmed Posted July 30, 2013 Author Report Share Posted July 30, 2013 all working. ill update the first post with instructions Link to comment Share on other sites More sharing options...
Adminlaststand Posted July 30, 2013 Report Share Posted July 30, 2013 good job mathew, can't test it tonight pesky new players on - will post on results later Link to comment Share on other sites More sharing options...
BillClinton Posted September 22, 2013 Report Share Posted September 22, 2013 I have a question. Do you have to add a certain directory towards the Folder you're placing in. like add Safe Zone [] execVM "Safezones"; Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now