m1ke909 0 Report post Posted October 9, 2013 I wanna make the citys are trader points safe zones, can anyone give me a hand please Quote Share this post Link to post Share on other sites More sharing options...
m1ke909 0 Report post Posted October 9, 2013 I wanna make the citys are trader points safe zones, can anyone give me a hand please Quote Share this post Link to post Share on other sites More sharing options...
Steal45 0 Report post Posted November 14, 2013 This adds safezones to all trader cities, airplane, bandit and hero traders. Original script credit to maca134 http://dayzepoch.com...-safezone-maybe Replace sensors with this in mission.sqm class Sensors { items=9; class Item0 { position[]={4053.8501,364.76645,11668.645}; activationBy="WEST"; repeating=1; interruptable=1; age="UNKNOWN"; name="zonebash"; expCond="(player distance zonebash) < 75;"; expActiv="TitleText[""Now entering trader city Bash"",""PLAIN DOWN""]; canbuild = false;"; expDesactiv="TitleText[""Now leaving trader city Bash"",""PLAIN DOWN""]; canbuild = true;"; class Effects { soundDet="arabian_market_1"; }; }; class Item1 { position[]={11463.747,317.3078,11349.89}; activationBy="WEST"; repeating=1; interruptable=1; age="UNKNOWN"; name="zoneklen"; expCond="(player distance zoneklen) < 75;"; expActiv="TitleText[""Now entering trader city Klen"",""PLAIN DOWN""]; canbuild = false;"; expDesactiv="TitleText[""Now leaving trader city Klen"",""PLAIN DOWN""]; canbuild = true;"; class Effects { soundDet="arabian_market_1"; }; }; class Item2 { position[]={6325.6772,304.99033,7807.7412}; activationBy="WEST"; repeating=1; interruptable=1; age="UNKNOWN"; name="zonestary"; expCond="(player distance zonestary) < 75;"; expActiv="TitleText[""Now entering trader city Stary"",""PLAIN DOWN""]; canbuild = false;"; expDesactiv="TitleText[""Now leaving trader city Stary"",""PLAIN DOWN""]; canbuild = true;"; class Effects { soundDet="arabian_market_1"; }; }; class Item3 { position[]={4053.8501,364.76645,11668.645}; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; name="zonebash_safezone"; expCond="(player distance zonebash_safezone) < 150;"; expActiv="inSafeZone = true;"; expDesactiv="inSafeZone = false;"; class Effects { }; }; class Item4 { position[]={11463.747,317.3078,11349.89}; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; name="zoneklen_safezone"; expCond="(player distance zoneklen_safezone) < 150;"; expActiv="inSafeZone = true;"; expDesactiv="inSafeZone = false;"; class Effects { }; }; class Item5 { position[]={6325.6772,304.99033,7807.7412}; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; name="zonestary_safezone"; expCond="(player distance zonestary_safezone) < 150;"; expActiv="inSafeZone = true;"; expDesactiv="inSafeZone = false;"; class Effects { }; }; class Item6 { position[]={1606.6443,289.70795,7803.5156}; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; name="bandit_safezone"; expCond="(player distance bandit_safezone) < 150;"; expActiv="inSafeZone = true;"; expDesactiv="inSafeZone = false;"; class Effects { }; }; class Item7 { position[]={12944.227,210.19823,12766.889}; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; name="Hero_safezone"; expCond="(player distance Hero_safezone) < 150;"; expActiv="inSafeZone = true;"; expDesactiv="inSafeZone = false;"; class Effects { }; }; class Item8 { position[]={12060.471,158.85699,12638.533}; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; name="Aircraft_safezone"; expCond="(player distance Aircraft_safezone) < 100;"; expActiv="inSafeZone = true;"; expDesactiv="inSafeZone = false;"; class Effects { }; }; }; }; Create a file called safezone.sqf in your mission folder Paste this in Private ["_EH_Fired"]; if (isNil "inSafezone") then { inSafezone = false; }; while {true} do { waitUntil { inSafeZone }; titleText [format["Entering Trader Area - God Mode Enabled"],"PLAIN DOWN"]; titleFadeOut 4; waitUntil { player == vehicle player }; thePlayer = vehicle player; _EH_Fired = thePlayer addEventHandler ["Fired", { titleText ["You can not fire your weapon in a Trader City Area","PLAIN DOWN"]; titleFadeOut 4; NearestObject [_this select 0,_this select 4] setPos[0,0,0]; }]; player_zombieCheck = {}; fnc_usec_damageHandler = {}; thePlayer removeAllEventHandlers "handleDamage"; thePlayer addEventHandler ["handleDamage", {false}]; thePlayer allowDamage false; waitUntil { !inSafeZone }; titleText [format["Exiting Trader Area - God Mode Disabled"],"PLAIN DOWN"]; titleFadeOut 4; thePlayer removeEventHandler ["Fired", _EH_Fired]; 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"; thePlayer addEventHandler ["handleDamage", {true}]; thePlayer removeAllEventHandlers "handleDamage"; thePlayer allowDamage true; }; Add this to the bottom of your init.sqf [] execVM "safezone.sqf"; Quote Share this post Link to post Share on other sites More sharing options...
Steal45 0 Report post Posted November 14, 2013 This adds safezones to all trader cities, airplane, bandit and hero traders. Original script credit to maca134 http://dayzepoch.com...-safezone-maybe Replace sensors with this in mission.sqm class Sensors { items=9; class Item0 { position[]={4053.8501,364.76645,11668.645}; activationBy="WEST"; repeating=1; interruptable=1; age="UNKNOWN"; name="zonebash"; expCond="(player distance zonebash) < 75;"; expActiv="TitleText[""Now entering trader city Bash"",""PLAIN DOWN""]; canbuild = false;"; expDesactiv="TitleText[""Now leaving trader city Bash"",""PLAIN DOWN""]; canbuild = true;"; class Effects { soundDet="arabian_market_1"; }; }; class Item1 { position[]={11463.747,317.3078,11349.89}; activationBy="WEST"; repeating=1; interruptable=1; age="UNKNOWN"; name="zoneklen"; expCond="(player distance zoneklen) < 75;"; expActiv="TitleText[""Now entering trader city Klen"",""PLAIN DOWN""]; canbuild = false;"; expDesactiv="TitleText[""Now leaving trader city Klen"",""PLAIN DOWN""]; canbuild = true;"; class Effects { soundDet="arabian_market_1"; }; }; class Item2 { position[]={6325.6772,304.99033,7807.7412}; activationBy="WEST"; repeating=1; interruptable=1; age="UNKNOWN"; name="zonestary"; expCond="(player distance zonestary) < 75;"; expActiv="TitleText[""Now entering trader city Stary"",""PLAIN DOWN""]; canbuild = false;"; expDesactiv="TitleText[""Now leaving trader city Stary"",""PLAIN DOWN""]; canbuild = true;"; class Effects { soundDet="arabian_market_1"; }; }; class Item3 { position[]={4053.8501,364.76645,11668.645}; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; name="zonebash_safezone"; expCond="(player distance zonebash_safezone) < 150;"; expActiv="inSafeZone = true;"; expDesactiv="inSafeZone = false;"; class Effects { }; }; class Item4 { position[]={11463.747,317.3078,11349.89}; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; name="zoneklen_safezone"; expCond="(player distance zoneklen_safezone) < 150;"; expActiv="inSafeZone = true;"; expDesactiv="inSafeZone = false;"; class Effects { }; }; class Item5 { position[]={6325.6772,304.99033,7807.7412}; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; name="zonestary_safezone"; expCond="(player distance zonestary_safezone) < 150;"; expActiv="inSafeZone = true;"; expDesactiv="inSafeZone = false;"; class Effects { }; }; class Item6 { position[]={1606.6443,289.70795,7803.5156}; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; name="bandit_safezone"; expCond="(player distance bandit_safezone) < 150;"; expActiv="inSafeZone = true;"; expDesactiv="inSafeZone = false;"; class Effects { }; }; class Item7 { position[]={12944.227,210.19823,12766.889}; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; name="Hero_safezone"; expCond="(player distance Hero_safezone) < 150;"; expActiv="inSafeZone = true;"; expDesactiv="inSafeZone = false;"; class Effects { }; }; class Item8 { position[]={12060.471,158.85699,12638.533}; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; name="Aircraft_safezone"; expCond="(player distance Aircraft_safezone) < 100;"; expActiv="inSafeZone = true;"; expDesactiv="inSafeZone = false;"; class Effects { }; }; }; }; Create a file called safezone.sqf in your mission folder Paste this in Private ["_EH_Fired"]; if (isNil "inSafezone") then { inSafezone = false; }; while {true} do { waitUntil { inSafeZone }; titleText [format["Entering Trader Area - God Mode Enabled"],"PLAIN DOWN"]; titleFadeOut 4; waitUntil { player == vehicle player }; thePlayer = vehicle player; _EH_Fired = thePlayer addEventHandler ["Fired", { titleText ["You can not fire your weapon in a Trader City Area","PLAIN DOWN"]; titleFadeOut 4; NearestObject [_this select 0,_this select 4] setPos[0,0,0]; }]; player_zombieCheck = {}; fnc_usec_damageHandler = {}; thePlayer removeAllEventHandlers "handleDamage"; thePlayer addEventHandler ["handleDamage", {false}]; thePlayer allowDamage false; waitUntil { !inSafeZone }; titleText [format["Exiting Trader Area - God Mode Disabled"],"PLAIN DOWN"]; titleFadeOut 4; thePlayer removeEventHandler ["Fired", _EH_Fired]; 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"; thePlayer addEventHandler ["handleDamage", {true}]; thePlayer removeAllEventHandlers "handleDamage"; thePlayer allowDamage true; }; Add this to the bottom of your init.sqf [] execVM "safezone.sqf"; Quote Share this post Link to post Share on other sites More sharing options...
Gramps 0 Report post Posted December 23, 2013 Thats easy just hit esc I have never been hurt in the lobby Quote Share this post Link to post Share on other sites More sharing options...
Gramps 0 Report post Posted December 23, 2013 Thats easy just hit esc I have never been hurt in the lobby Quote Share this post Link to post Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.