Jump to content
  • 0

[FIX] When player gets into SargeAI spawned patrol vehicle & it blows up


mgm

Question

Hi All,

 

Even though this is probably a 2 second job for an experienced scripter, it took me far too long to sort it out. Now that it is working, I would like to share with others who might need it. 

If you're having the same issue with Sarge AI on an Epoch Admin Tools installed server (issue = when player gets into SargeAI spawned patrol vehicle & it blows up), here is the fix.

Preliminary tests show, it works fine on my server.

 

 

Packed PBO archive = @DayZ_Epoch_Server > addons > dayz_server.pbo

File in archive =  init > server_functions.sqf

 

 

Modification Steps

  1. Unpack the PBO, open the abovementioned file with Notepad++, find the section below by seaching for this >> server_checkHackers.
  2. Delete the whole block that exists in your file (take a backup of the file first!) then copy & paste the whole block.
  3. Save the file & exit file editor.
  4. Repack the PBO.
  5. Restart the server & test.

Hope this helps someone, I wish I had this post somewhere in the forums, 4 hours ago :)

server_checkHackers = {
	if (DZE_DYN_AntiStuck2nd > 3) then { DZE_DYN_HackerCheck = nil; DZE_DYN_AntiStuck2nd = 0; };
	if(!isNil "DZE_DYN_HackerCheck") exitWith {  DZE_DYN_AntiStuck2nd = DZE_DYN_AntiStuck2nd + 1;};
	DZE_DYN_HackerCheck = true;
	{
// Epoch Admin Tools
//epoch admin default line is the one below
//		if(vehicle _x != _x && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle) && (vehicle _x getVariable ["MalSar",0] !=1)) then {

// This is working copied from http://opendayz.net/threads/killing-a-hacker.19355/#post-98883
//		if(vehicle _x != _x && (vehicle _x getVariable ["Sarge",0] != 1) && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle)) then {

// the above two combined
		if(vehicle _x != _x && !(vehicle _x in PVDZE_serverObjectMonitor) && (vehicle _x getVariable ["Sarge",0] != 1) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle) && (vehicle _x getVariable ["MalSar",0] !=1)) then {
			diag_log ("CLEANUP: KILLING A HACKER " + (name _x) + " " + str(_x) + " IN " + (typeOf vehicle _x));
			(vehicle _x) setDamage 1;
			_x setDamage 1;
			sleep 0.25;
		};
		sleep 0.001;
	} forEach allUnits;
	DZE_DYN_HackerCheck = nil;
};

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

 

Hi All,

 

Even though this is probably a 2 second job for an experienced scripter, it took me far too long to sort it out. Now that it is working, I would like to share with others who might need it. 

If you're having the same issue with Sarge AI on an Epoch Admin Tools installed server (issue = when player gets into SargeAI spawned patrol vehicle & it blows up), here is the fix.

Preliminary tests show, it works fine on my server.


Only time my vehicle blow up is when a player enters a editor added vehicle.

Like a refuel ural that is part of a map composition.

I am trying this fix. I hope it works...

 

 

edit....

Nope  now it just kills player ;(

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
  • Discord

×
×
  • Create New...