AGN doesn't see Safe Zones

BlackSerega2010

New Member
Hello people,

I have a problem. I installed AGN mod correctly but, when i enter trade zone it doesn't show me any messages about it, godmode doesn't work etc..

Here's my agn & init file

AGN.sqf
/*
* Safezone Commander Script by AlienX
* www.opendayz.net
* Thanks to everyone who has provided other scripts of the same format, without you I would not have been able to make this.
*/

diag_log ("[AGN] Starting Trader City Safezone Commander!");

if( isDedicated || isServer ) exitWith {diag_log ("Error: Attempting to start AGN products on a server where it should not be!");};

Private["_EH_Fired","_ehID","_fix","_inVehicle","_inVehicleLast","_EH_Fired_Vehicle","_inVehicleDamage","_antiBackpackThread","_antiBackpackThread2"];

//SCRIPT SETTINGS
AGN_safeZoneDebug =false;//Debug notes on screen.
AGN_safeZoneGodmode =true;//Should safezone Godmode be enabled?
AGN_safeZoneMessages =true;//Should players get messages when entering and exiting the safe zone?
AGN_safeZone_Backpack_EnableAntiBackpack =true;//Should players not be able to take from peoples bags?
AGN_safeZone_Backpack_AllowGearFromLootPiles =true;//Should players be able to loot from loot piles?
AGN_safeZone_Backpack_AllowGearFromVehicles =true;//Should players be able to loot from a vehicles gear?
AGN_safeZone_Backpack_AllowGearFromDeadPlayers =true;//Should players be able to loot from a dead players corpse?
AGN_safeZone_Backpack_AllowFriendlyTaggedAccess =true;//Should players who are tagged friendly be able to access eachothers bags?
AGN_safeZone_Vehicles_DisableMountedGuns =true;//Should players not be able to shoot bullets/projectiles from mounted guns?
AGN_safeZone_Vehicles_AllowGearFromWithinVehicles =true;//Should players be able to open the gear screen while they are inside a vehicle?
AGN_safeZone_Players_DisableWeaponFiring =true;//Should players not be able to shoot bullets/projectiles from their weapon(s)?

//Probs not needed, but meh :)
disableSerialization;

waitUntil {!isNil "dayz_animalCheck"};if( AGN_safeZoneMessages )then{ systemChat ("[AGN] Скрипт для торговой зоны загружен!");};

_inVehicle = objNull;
_inVehicleLast = objNull;

while{true}do{

waitUntil {!canBuild };

_inSafezoneFinished =false;if( AGN_safeZoneMessages )then{ systemChat ("[AGN] Входим в торговую зону - неуязвимость активирована");};
_thePlayer = player;

if( AGN_safeZoneGodmode )then{
player_zombieCheck ={};
fnc_usec_damageHandler ={};
_thePlayer removeAllEventHandlers "handleDamage";
_thePlayer addEventHandler ["handleDamage",{false}];
_thePlayer allowDamage false;};

if( AGN_safeZone_Players_DisableWeaponFiring )then{
_EH_Fired = _thePlayer addEventHandler ["Fired",{
systemChat ("[AGN] You can not fire your weapon in a Trader City Area");NearestObject[_this select0,_this select4] setPos[0,0,0];}];};

if( AGN_safeZone_Backpack_EnableAntiBackpack )then{
AGN_LastPlayerLookedAt = objNull;
AGN_LastPlayerLookedAtCountDown =5;
_antiBackpackThread =[] spawn {private["_ct","_ip","_ia","_dis"];while{!canBuild}do{if( isNull AGN_LastPlayerLookedAt )then{
waitUntil {!isNull cursorTarget};
_ct = cursorTarget;
_ip = isPlayer _ct;if( _ip )then{ _ia = alive _ct; _dis = _ct distance player;}else{ _ia =false; _dis =1000;};

if((_ip && _ia)&&(_dis <6.5))then{
AGN_LastPlayerLookedAt = _ct;};}else{
AGN_LastPlayerLookedAtCountDown = AGN_LastPlayerLookedAtCountDown -1;if( AGN_LastPlayerLookedAtCountDown <0)then{ AGN_LastPlayerLookedAtCountDown =5; AGN_LastPlayerLookedAt = objNull;};
sleep 1;};};};

_antiBackpackThread2 =[] spawn {private["_to","_dis","_inchk","_ip","_ia","_skip","_ct","_iv","_lp","_inv","_ctOwnerID","_friendlies","_if"];
_ctOwnerID =0;while{!canBuild}do{
_ct = cursorTarget;
_skip =false;

if(!isNull (_ct))then{
_to = typeOf _ct;
_dis = _ct distance player;
_inchk =["WeaponHolder","ReammoBox"];

_lp =false;{if((_to isKindOf _x)&&(_dis <10)&& AGN_safeZone_Backpack_AllowGearFromLootPiles )then{
_lp =true;};} forEach ( _inchk );

_ip = isPlayer _ct;
_ia = alive _ct;
_iv = _ct isKindOf "AllVehicles";
_inv =(vehicle player != player);

_if =false;if( _ip )then{
_ctOwnerID = _ct getVariable["CharacterID","0"];
_friendlies = player getVariable ["friendlyTo",[]];if(_ctOwnerID in _friendlies)then{if( AGN_safeZone_Backpack_AllowFriendlyTaggedAccess )then{
_if =true;};};};if( AGN_safeZoneDebug )then{
hintSilent ( format["AGN Safezone Commander\n\nCursorTarget\n%1\n\nDistance\n%2\n\nLootpile\n%3 [%9]\n\nisPlayer\n%4\n\nAlive\n%5\n\nisVehicle\n%6\n\ninVehicle\n%7\n\nisFriendly\n%8 (%12) [%10]\n\nSkip: %11\n",
_ct, _dis, _lp, _ip, _ia, _iv, _inv, _if, AGN_safeZone_Backpack_AllowGearFromLootPiles, AGN_safeZone_Backpack_AllowFriendlyTaggedAccess, _skip, _ctOwnerID]);};


//Lootpile checkif( _lp )then{_skip =true;};

//Dead body checkif(!(_ia)&& AGN_safeZone_Backpack_AllowGearFromDeadPlayers )then{_skip =true;};

//Vehicle checkif( _iv &&(_dis <10)&&!(_ip)&& AGN_safeZone_Backpack_AllowGearFromVehicles )then{_skip =true;};

//In a vehicle checkif( _inv && AGN_safeZone_Vehicles_AllowGearFromWithinVehicles )then{ _skip =true;};

//Is player friendly?if( _if )then{ _skip =true;};};

if(!isNull (FindDisplay106)&&!_skip )then{if( isNull AGN_LastPlayerLookedAt )then{(findDisplay 106) closeDisplay 1;
waitUntil { isNull (FindDisplay106)};
createGearDialog [(player),'RscDisplayGear'];if( AGN_safeZoneMessages )then{ systemChat ("[AGN] Анти-вор - возвращаем вас к вашему снаряжению!");};
waitUntil { isNull (FindDisplay106)};}else{if( AGN_safeZoneMessages )then{ systemChat (format["[AGN] Вы не можете посмотреть свой инвентарь, т.к. вы посмотрели на другого игрока в течении 5 секунд"]);};(findDisplay 106) closeDisplay 1;
waitUntil { isNull (FindDisplay106)};};};if( _skip && _if )then{if( AGN_safeZoneMessages )then{ systemChat ("[AGN] Этот игрок отмечен как дружелюбный. Вы можете использовать его снаряжение) };
};
};
};
};

if ( AGN_safeZone_Vehicles_DisableMountedGuns ) then
{
while { !canBuild } do
{
sleep 0.1;
if ( !(isNull _inVehicle) && (vehicle player == player) ) then
{
_inVehicle removeEventHandler ["Fired", _EH_Fired_Vehicle];
_inVehicleLast = _inVehicle;
_inVehicleLast removeEventHandler ["Fired", _EH_Fired_Vehicle];
_inVehicle = objNull;
};

if ( vehicle player != player && isNull _inVehicle ) then
{
if (AGN_safeZoneMessages) then { systemChat ( "[AGN]Отключенавозможностьиспользованиявооружениятранспорта" ); };
_inVehicle = vehicle player;
_inVehicleDamage = getDammage _inVehicle;
_EH_Fired_Vehicle = _inVehicle addEventHandler ["Fired", {
systemChat ("[AGN]Вынеможетеиспользоватьвооружениетранспортавторговойзоне");
NearestObject [_this select 0,_this select 4] setPos[0,0,0];
}];
};
};
} else {
waitUntil { canBuild };
};

AGN_LastPlayerLookedAt = objNull;
AGN_LastPlayerLookedAtCountDown = 5;
terminate _antiBackpackThread;
terminate _antiBackpackThread2;
if ( AGN_safeZoneMessages ) then { systemChat ("[AGN]Покидаемторговуюзону-неуязвимостьотключена"); };

if ( AGN_safeZone_Vehicles_DisableMountedGuns ) then
{
if ( !(isNull _inVehicle) ) then
{
if ( AGN_safeZoneMessages ) then { systemChat ( "[AGN]Включенавозможностьиспользованиявооружениятранспорта" ); };
_inVehicle removeEventHandler ["Fired", _EH_Fired_Vehicle];
};

if ( !(isNull _inVehicleLast) ) then
{
if ( AGN_safeZoneMessages ) then { systemChat ( "[AGN]Включенавозможностьиспользованиявооружениятранспорта" ); };
_inVehicleLast removeEventHandler ["Fired", _EH_Fired_Vehicle];
};
};

if ( AGN_safeZone_Players_DisableWeaponFiring ) then
{
_thePlayer removeEventHandler ["Fired", _EH_Fired];
};

if ( AGN_safeZoneGodmode ) then
{
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;
};
_inSafezoneFinished = true;
};
Help me, please
rolleyes.gif
 
Init.sqf
/*
For DayZ Epoch
Addons Credits: Jetski Yanahui by Kol9yN, Zakat, Gerasimow9, YuraPetrov, zGuba, A.Karagod, IceBreakr, Sahbazz
*/
startLoadingScreen ["","RscDisplayLoadCustom"];
cutText ["","BLACK OUT"];
enableSaving [false,false];

//REALLY IMPORTANT VALUES
dayZ_instance =11;//The instance
dayzHiveRequest =[];
initialized =false;
dayz_previousID =0;

//disable greeting menu
player setVariable ["BIS_noCoreConversations",true];//disable radio messages to be heard and shown in the left lower corner of the screen
enableRadio false;// May prevent "how are you civillian?" messages from NPC
enableSentences false;

// DayZ Epoch config
spawnShoremode =1;// Default = 1 (on shore)
spawnArea=1500;// Default = 1500

MaxVehicleLimit=300;// Default = 50MaxDynamicDebris=500;// Default = 100
dayz_MapArea =14000;// Default = 10000
dayz_maxLocalZombies =30;// Default = 30

dayz_paraSpawn =false;

dayz_minpos =-1;
dayz_maxpos =16000;

dayz_sellDistance_vehicle =10;
dayz_sellDistance_boat =30;
dayz_sellDistance_air =40;

dayz_maxAnimals =5;// Default: 8
dayz_tameDogs =true;DynamicVehicleDamageLow=0;// Default: 0DynamicVehicleDamageHigh=100;// Default: 100

DZE_BuildOnRoads =false;// Default: False

EpochEvents=[["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]];
dayz_fullMoonNights =true;

//Load in compiled functions
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";//Initilize the Variables (IMPORTANT: Must happen very early)
progressLoadingScreen 0.1;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf";//Initilize the publicVariable event handlers
progressLoadingScreen 0.2;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf";//Functions used by CLIENT for medical
progressLoadingScreen 0.4;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";//Compile regular functions
progressLoadingScreen 0.5;
call compile preprocessFileLineNumbers "server_traders.sqf";//Compile trader configs
progressLoadingScreen 1.0;

"filmic" setToneMappingParams [0.153,0.357,0.231,0.1573,0.011,3.750,6,4]; setToneMapping "Filmic";

if(isServer)then{
call compile preprocessFileLineNumbers "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\dynamic_vehicle.sqf";//Compile vehicle configs

// Add trader citys
_nil =[] execVM "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf";
_serverMonitor =[] execVM "\z\addons\dayz_code\system\server_monitor.sqf";};

if(!isDedicated)then{//Conduct map operations0 fadeSound 0;
waitUntil {!isNil "dayz_loadScreenMsg"};
dayz_loadScreenMsg =(localize "STR_AUTHENTICATING");[] execVM "AGN\agn_SafeZoneCommander.sqf";

//Run the player monitor
_id = player addEventHandler ["Respawn",{_id =[] spawn player_death;}];
_playerMonitor =[] execVM "\z\addons\dayz_code\system\player_monitor.sqf";

//anti Hack

//Lights//[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";

};

//Start Dynamic Weather
execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf";


#include"\z\addons\dayz_code\system\BIS_Effects\init.sqf"
 
Back
Top