Godmodesavezone & Zombifreie Trader

Aus Nitradopedia
Wechseln zu: Navigation, Suche
Arma3Epoch header.png

Miete dir jetzt deinen eigenen prepaid ArmA 3 Epoch Server auf nitrado.net

Im Nitrado AdminTool einen Haken bei "Sicherheitszone erlaunen" reinmachen.

Folgendes in die "init" ganz unten kopieren. Die "init" findet ihr im Ordner "Mission.pbo".

// Safezone
[] execVM "safezone\safezoneposition.sqf";
[] execVM "safezone\safezone.sqf";

Jetzt erstellt ihr euch einen Ordner Namens "safezone" und kopiert die folgenden 3 Sachen unten rein.

safezone.sqf

Private ["_EH_Fired"];

if (isNil "inSafezone") then {
inSafezone = false;
};

while {true} do {
waitUntil { inSafeZone };
titleText [format["Betretten der Sicherheitszone ! Waffen wurden gesichert !"],"PLAIN DOWN"]; titleFadeOut 4;

waitUntil { player == vehicle player };

theCar = vehicle LandVehicle;
thePlayer = vehicle player;
_EH_Fired = thePlayer addEventHandler ["Fired", {
titleText ["Munitionsverschwendung !!! Sicherheitszone !!!","PLAIN DOWN"]; titleFadeOut 4;
NearestObject [_this select 0,_this select 4] setPos[0,0,0];
}];

player_zombieCheck = {};
player_fired = {};
fnc_usec_damageHandler = {};
// fnc_usec_unconscious = {};
thePlayer removeAllEventHandlers "handleDamage";
thePlayer addEventHandler ["handleDamage", {false}];
thePlayer allowDamage false;

theCar removeAllEventHandlers "handleDamage";
theCar addEventHandler ["handleDamage", {false}];
theCar allowDamage false;

waitUntil { !inSafeZone };

titleText [format["Verlassen der Sicherheitszone ! Ihr Waffe wurde entsichert !"],"PLAIN DOWN"]; titleFadeOut 4;
thePlayer removeEventHandler ["Fired", _EH_Fired];

player_zombieCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf";
player_fired = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_fired.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";
thePlayer addEventHandler ["handleDamage", {true}];
thePlayer removeAllEventHandlers "handleDamage";
thePlayer allowDamage true;
theCar addEventHandler ["handleDamage", {true}];
theCar removeAllEventHandlers "handleDamage";
theCar allowDamage true;

};

safezoneposition.sqf

/*
Name: Safezone
Date: 15/7/2013
Mod: Dayz Epoch
Map: Chernarus
*/

// Trader City Stary
_this = createTrigger ["EmptyDetector", [6325.6772, 7807.7412, 0]];
_this setTriggerArea [150, 150, 0, false];
_this setTriggerActivation ["NONE", "PRESENT", true];
_this setTriggerStatements ["(player distance trading_post1) < 100;", "inSafeZone = true; canbuild = false;", "inSafeZone = false; canbuild = true;"];
trading_post1 = _this;
_trigger_0 = _this;
[[6325.6772, 7807.7412, 0],100] execVM "safezone\SAR_nuke_zeds.sqf";

// Trader City Bash
_this = createTrigger ["EmptyDetector", [4063.4226, 11664.19, 0]];
_this setTriggerArea [150, 150, 0, false];
_this setTriggerActivation ["NONE", "PRESENT", true];
_this setTriggerStatements ["(player distance trading_post2) < 100;", "inSafeZone = true; canbuild = false;", "inSafeZone = false; canbuild = true;"];
trading_post2 = _this;
_trigger_1 = _this;
[[4063.4226, 11664.19, 0],100] execVM "safezone\SAR_nuke_zeds.sqf";

// Trader City Klen
_this = createTrigger ["EmptyDetector", [11447.472, 11364.504, 0]];
_this setTriggerArea [150, 150, 0, false];
_this setTriggerActivation ["NONE", "PRESENT", true];
_this setTriggerStatements ["(player distance trading_post3) < 100;", "inSafeZone = true; canbuild = false;", "inSafeZone = false; canbuild = true;"];
trading_post3 = _this;
_trigger_2 = _this;
[[11447.472, 11364.504, 0],100] execVM "safezone\SAR_nuke_zeds.sqf";

// Trader Airport
_this = createTrigger ["EmptyDetector", [12072.707, 12672.13, 0]];
_this setTriggerArea [150, 150, 0, false];
_this setTriggerActivation ["NONE", "PRESENT", true];
_this setTriggerStatements ["(player distance trading_post4) < 100;", "inSafeZone = true; canbuild = false;", "inSafeZone = false; canbuild = true;"];
trading_post4 = _this;
_trigger_3 = _this;
[[12072.707, 12672.13, 0],100] execVM "safezone\SAR_nuke_zeds.sqf";

// Trader Hero
_this = createTrigger ["EmptyDetector", [12910.84, 12760.42, 0]];
_this setTriggerArea [150, 150, 0, false];
_this setTriggerActivation ["NONE", "PRESENT", true];
_this setTriggerStatements ["(player distance trading_post5) < 100;", "inSafeZone = true; canbuild = false;", "inSafeZone = false; canbuild = true;"];
trading_post5 = _this;
_trigger_4 = _this;
[[12910.84, 12760.42, 0],100] execVM "safezone\SAR_nuke_zeds.sqf";

SAR_nuke_zeds.sqf

/*
Author: Sarge

Description:
Kills all zombies in a given distance from a given point.

Needs 2 parameters:

_location = the exact x/y/z location of the center of the area that should be zed free
_range = the radius within which zeds get killed


*/

private["_location","_radius","_nuker","_obj_text_string"];

if(!isServer) exitwith{};

_location = _this select 0;
_radius = _this select 1;

_nuker = createvehicle ["HeliHEmpty",[_location select 0,_location select 1,1] ,[],0,"NONE"];
_nuker allowDamage false;

_obj_text_string = format["#(argb,8,8,3)color(%1,%2,%3,%4,ca)",1,1,0,1];
[nil,nil,rSETOBJECTTEXTURE,_nuker,0,_obj_text_string] call RE;

[_nuker,_radius] spawn {

private ["_nuker","_radius","_entity_array"];
_nuker = _this select 0;
_radius = _this select 1;

while {true} do {

_entity_array = (getPos _nuker) nearEntities ["CAManBase",_radius];
{
if (_x isKindof "zZombie_Base") then {
_x setDamage 1;
};
} forEach _entity_array;
sleep 2;
};
};