Jump to content
  • 0

[HELP] Zombie Free Safe Zones?


mysticviperx

Question

This is my current Safe Zones Script:

Private ["_EH_Fired"];

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

if (isNil "demiGOD") then {
	demiGOD = 0;
};

while {true} do {
	waitUntil { inSafeZone };
	titleText [format["Entering Safe Zone. Your weapons have been deactivated."],"PLAIN DOWN"]; titleFadeOut 4;

	waitUntil { player == vehicle player };

	thePlayer = vehicle player;
	_EH_Fired = thePlayer addEventHandler ["Fired", {
		titleText ["Don't waste your ammo, your shootin blanks.","PLAIN DOWN"]; titleFadeOut 4;
		NearestObject [_this select 0,_this select 4] setPos[0,0,0];
	}];

	if (demiGOD == 0) then {
		player_zombieCheck = {};
		fnc_usec_damageHandler = {};
		fnc_usec_unconscious  = {};
		thePlayer removeAllEventHandlers "handleDamage";
		thePlayer addEventHandler ["handleDamage", {false}];
		thePlayer allowDamage false;
	};
	
	waitUntil { !inSafeZone };

	titleText [format["Exiting Safe Zone. Your weapons have been reactivated."],"PLAIN DOWN"]; titleFadeOut 4;
	thePlayer removeEventHandler ["Fired", _EH_Fired];

	if (demiGOD == 0) 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";
		fnc_usec_unconscious = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_unconscious.sqf";
		thePlayer addEventHandler ["handleDamage", {true}];
		thePlayer removeAllEventHandlers "handleDamage";
		thePlayer allowDamage true;
	};
};

Currently this gives the player 'God Mode' and Disables the damage of the bullets you fire. What I'm looking for is a addition of the script that will delete/teleport/remove zombies from the zone.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

I am necromancing this thread because Im curious, do I need to make a completely new sensor for this, or just modify my existing sensor? And if Im modifying the existing sensors, exactly which part am I editing to make this work... I feel like the stuff you have under class effects is something unique to your server?  Thanks. Im currently using the old zed nuker from SARGE way back in the day. It works but it leaves a bunch of dead zombies around, your way sounds much cleaner.

Link to comment
Share on other sites

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...