Jump to content
  • 0

[SOLVED] God Mode in Trader Cities !


KrisiS

Question

Hi,

 

I am having trouble getting protection in the trader cities, could someone please point me in the right direction?

The following, I have done but the protection doesn't work when you enter the trade area, nor does the message regarding God mode come up as in the safezone.sqf.

 

 

I have added safezone.sqf to the root folder of my mission.pbo

 

safezone.sqf:

//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 the Trading post, 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 Trading Post, 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;
  } 

I have changed my class sensors in mission.sqm to:

	class Sensors
	{
		items=5;
		class Item0
		{
			position[]={6325.6772,304.99033,7807.7412};
			a=100;
			b=100;
			activationBy="WEST";
			repeating=1;
			interruptable=1;
			age="UNKNOWN";
			name="zonestary";
			expCond="(player distance zonestary) < 100;";
			expActiv="TitleText[""Now entering trader city Stary"",""PLAIN DOWN""]; canbuild = false; inTraderCity = ""Stary""; execVM ""safezone.sqf"";";
			expDesactiv="TitleText[""Now leaving trader city Stary"",""PLAIN DOWN""]; canbuild = true; inTraderCity = ""Any"";";
			class Effects
			{
			};
		};
		class Item1
		{
			position[]={4063.4226,365.00577,11664.19};
			a=100;
			b=100;
			activationBy="WEST";
			repeating=1;
			interruptable=1;
			age="UNKNOWN";
			name="zonebash";
			expCond="(player distance zonebash) < 100;";
			expActiv="TitleText[""Now entering trader city Bash"",""PLAIN DOWN""]; canbuild = false; inTraderCity = ""Bash""; execVM ""safezone.sqf"";";
			expDesactiv="TitleText[""Now leaving trader city Bash"",""PLAIN DOWN""]; canbuild = true; inTraderCity = ""Any"";";
			class Effects
			{
			};
		};
		class Item2
		{
			position[]={11447.472,317.26886,11364.504};
			a=100;
			b=100;
			activationBy="WEST";
			repeating=1;
			interruptable=1;
			age="UNKNOWN";
			name="zoneklen";
			expCond="(player distance zoneklen) < 100;";
			expActiv="TitleText[""Now entering trader city Klen"",""PLAIN DOWN""]; canbuild = false; inTraderCity = ""Klen""; execVM ""safezone.sqf"";";
			expDesactiv="TitleText[""Now leaving trader city Klen"",""PLAIN DOWN""]; canbuild = true; inTraderCity = ""Any"";";
			class Effects
			{
			};
		};
		class Item3
		{
			position[]={1606.6443,289.70795,7803.5156};
			a=100;
			b=100;
			activationBy="WEST";
			repeating=1;
			interruptable=1;
			age="UNKNOWN";
			name="zonebandit";
			expCond="(player distance zonebandit) < 100;";
			expActiv="canbuild = false; inTraderCity = ""Bandit Trader""; execVM ""safezone.sqf"";";
			expDesactiv="canbuild = true; inTraderCity = ""Any"";";
			class Effects
			{
			};
		};
		class Item4
		{
			position[]={12944.227,210.19823,12766.889};
			a=100;
			b=100;
			activationBy="WEST";
			repeating=1;
			interruptable=1;
			age="UNKNOWN";
			name="zonehero";
			expCond="(player distance zonehero) < 100;";
			expActiv="canbuild = false; inTraderCity = ""Hero Trader""; execVM ""safezone.sqf"";";
			expDesactiv="canbuild = true; inTraderCity = ""Any"";";
			class Effects
			{
			};
		};
	};
};
Link to comment
Share on other sites

1 answer to this question

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...