Jump to content
  • 0

Help cleaning up parachutes from HALO spawns with new beta version. ..


DangerRuss

Question

So I run halo respawns on my server, but because of the new arma beta version, The parachutes don't delete once the player lands. This causes hundreds of parachutes to be floating around the map.. you should see Balota.. anyways I can't seem to find any information on how to get the server to clean these up. This is literally the only issue I'm having with the new beta. The only suggestions I've received so far are to roll back to the previous beta but that's not really an option for me. So does anyone have a way I can fix this? It would be much appreciated. For the record I'm running Overwatch if that matters. Thanks!

Link to comment
Share on other sites

Recommended Posts

  • 0

called it HALOcleanup.sqf.... slapped it in my fixes folder with the other HALO stuff. Called it at the bottom of the init.sqf above the halo script.

[] execVM "fixes\HALOcleanup.sqf";
MC_BIS_halo_spawn = compile preprocessFileLineNumbers "fixes\haloInit.sqf";
private["_mkr"];
_mkr = "spawn" + str(round(random 4));
if (!isDedicated) then {
    [] spawn {
        waitUntil { !isNil ("dayz_animalCheck") and
!(player getVariable ["humanity",0] > 5000 and
typeOf player == "Survivor2_DZ") and
!(player getVariable ["humanity",0] < -2000 and
(typeOf player == "Survivor2_DZ" or
typeOf player == "SurvivorW2_DZ") ) and
!(player getVariable ["humanity",0] > 0 and
(typeOf player == "Bandit1_DZ" or
typeOf player == "BanditW1_DZ") )
};
 
        if (PVCDZ_plr_Login2 select 2) then
        {
            _pos = position player;
            _mkr setMarkerPos [_pos select 0, _pos select 1];
            player spawn MC_BIS_halo_spawn;
			_nul = [] execVM "custom\altimeter.sqf";
        };
    };
};
Link to comment
Share on other sites

  • 0

 

called it HALOcleanup.sqf.... slapped it in my fixes folder with the other HALO stuff. Called it at the bottom of the init.sqf above the halo script.

[] execVM "fixes\HALOcleanup.sqf";
MC_BIS_halo_spawn = compile preprocessFileLineNumbers "fixes\haloInit.sqf";
private["_mkr"];
_mkr = "spawn" + str(round(random 4));
if (!isDedicated) then {
    [] spawn {
        waitUntil { !isNil ("dayz_animalCheck") and
!(player getVariable ["humanity",0] > 5000 and
typeOf player == "Survivor2_DZ") and
!(player getVariable ["humanity",0] < -2000 and
(typeOf player == "Survivor2_DZ" or
typeOf player == "SurvivorW2_DZ") ) and
!(player getVariable ["humanity",0] > 0 and
(typeOf player == "Bandit1_DZ" or
typeOf player == "BanditW1_DZ") )
};
 
        if (PVCDZ_plr_Login2 select 2) then
        {
            _pos = position player;
            _mkr setMarkerPos [_pos select 0, _pos select 1];
            player spawn MC_BIS_halo_spawn;
			_nul = [] execVM "custom\altimeter.sqf";
        };
    };
};

 

ok, check again, that the script is identical to the one here, there was a minor error around line 19, which could be the reason its not cleaning for you

 

also note that it waits 5min (was 10min) before it actually starts cleaning

Link to comment
Share on other sites

  • 0

ok, check again, that the script is identical to the one here, there was a minor error around line 19, which could be the reason its not cleaning for you

 

also note that it waits 5min (was 10min) before it actually starts cleaning

alright I will retry, but to make sure Im being clear, the script is only working for me, and no one else. Which is why I originally suspected an antihack conflict.

 

Yea the script is the exact same you posted above. I checked the server after several hours and there were tons of parachutes still floating around, but mine disappears when I land, so perhaps I need to whitelist it somehow? Not sure how though.

Link to comment
Share on other sites

  • 0

alright I will retry, but to make sure Im being clear, the script is only working for me, and no one else. Which is why I originally suspected an antihack conflict.

 

Yea the script is the exact same you posted above. I checked the server after several hours and there were tons of parachutes still floating around, but mine disappears when I land, so perhaps I need to whitelist it somehow? Not sure how though.

 

it does sound wierd tho, this is only supposed to be running serverside, so it shouldnt be blocked by antihacks and i dont see anything in the script that could possibly be blocked for a good reason anyways.

 

ill see if i can think of a diffrent way to do this tho (god i hope a new working beta will be availible soon)

Link to comment
Share on other sites

  • 0

it does sound wierd tho, this is only supposed to be running serverside, so it shouldnt be blocked by antihacks and i dont see anything in the script that could possibly be blocked for a good reason anyways.

 

ill see if i can think of a diffrent way to do this tho (god i hope a new working beta will be availible soon)

Is there a way to run it in the server PBO instead of the mission PBO or wont that even make a difference? 

Maybe if I click my heels together 3 times infiSTAR will pop in and tell us how to whitelist this? lol

Link to comment
Share on other sites

  • 0

Is there a way to run it in the server PBO instead of the mission PBO or wont that even make a difference? 

Maybe if I click my heels together 3 times infiSTAR will pop in and tell us how to whitelist this? lol

 

it dosnt matter where it is really, the script dictates it to only run on the server ... do you get any logs from this?

Link to comment
Share on other sites

  • 0

TBH there are a couple of new errors in my RPT that Im not sure where they come from. I think the one is related to my kill messages as it deals with

14:12:55   Error position: <_victim removeAllEventHandlers "MPHit";

but theres this which I haven't seen before until just now.

10:19:28   Error Undefined variable in expression: _type
10:19:28 File z\addons\dayz_server\compile\fa_hiveMaintenance.sqf, line 267
10:19:28 Error in expression <j" from 0 to (count _vehcat-1) do {
if (_type == ((_vehcat select _j) select 0))>
10:19:28   Error position: <_type == ((_vehcat select _j) select 0))>


Heres a bit of that block from the fa_hivemaintenance.sqf

	// check the amount of vehicles of each kind
	{
		_type =	_x select 2;
		for "_j" from 0 to (count _vehcat-1) do {
			if (_type == ((_vehcat select _j) select 0)) then {
				_count = ((_vehcat select _j) select 1);
				if (_count > 0) then {
					(_vehcat select _j) set [1, (_count-1)];
					if ((_x select 8) >= 1) then { 
#ifdef VEH_MAINTENANCE_ADD_MISSING	
						(_myArray select _forEachIndex) set [8, 0.9] ; // damage = 0.9 so this veh will me respawned

Im not really sure if this is related, do you know?

 

just spotted this one too. Another fa_hivemaintenance. Im pretty sure I didnt have these in the RPT before... Im gonna remove the script and see if they're still in the RPT

{
_type =	_x select 2;
for "_j" from 0 to (count _>
10:19:28   Error position: <_x select 2;
for "_j" from 0 to (count _>
10:19:28   Error Undefined variable in expression: _x
10:19:28 File z\addons\dayz_server\compile\fa_hiveMaintenance.sqf, line 265
10:19:28 Error in expression <j" from 0 to (count _vehcat-1) do {
if (_type == ((_vehcat select _j) select 0))>

I removed the execVM calling the script and these are still in my database so Im stumped as to what these are.

Link to comment
Share on other sites

  • 0

TBH there are a couple of new errors in my RPT that Im not sure where they come from. I think the one is related to my kill messages as it deals with

14:12:55   Error position: <_victim removeAllEventHandlers "MPHit";

but theres this which I haven't seen before until just now.

10:19:28   Error Undefined variable in expression: _type
10:19:28 File z\addons\dayz_server\compile\fa_hiveMaintenance.sqf, line 267
10:19:28 Error in expression <j" from 0 to (count _vehcat-1) do {
if (_type == ((_vehcat select _j) select 0))>
10:19:28   Error position: <_type == ((_vehcat select _j) select 0))>


Heres a bit of that block from the fa_hivemaintenance.sqf

	// check the amount of vehicles of each kind
	{
		_type =	_x select 2;
		for "_j" from 0 to (count _vehcat-1) do {
			if (_type == ((_vehcat select _j) select 0)) then {
				_count = ((_vehcat select _j) select 1);
				if (_count > 0) then {
					(_vehcat select _j) set [1, (_count-1)];
					if ((_x select 8) >= 1) then { 
#ifdef VEH_MAINTENANCE_ADD_MISSING	
						(_myArray select _forEachIndex) set [8, 0.9] ; // damage = 0.9 so this veh will me respawned

Im not really sure if this is related, do you know?

 

just spotted this one too. Another fa_hivemaintenance. Im pretty sure I didnt have these in the RPT before... Im gonna remove the script and see if they're still in the RPT

{
_type =	_x select 2;
for "_j" from 0 to (count _>
10:19:28   Error position: <_x select 2;
for "_j" from 0 to (count _>
10:19:28   Error Undefined variable in expression: _x
10:19:28 File z\addons\dayz_server\compile\fa_hiveMaintenance.sqf, line 265
10:19:28 Error in expression <j" from 0 to (count _vehcat-1) do {
if (_type == ((_vehcat select _j) select 0))>

I removed the execVM calling the script and these are still in my database so Im stumped as to what these are.

 

this isnt related to my script ...

 

not exactly sure what the problem is for you, but iirc the fa_hiveMaintenance error was in overwatch even before the new patch ... i cant remeber what it was and why tho.

Link to comment
Share on other sites

  • 0

this isnt related to my script ...

 

not exactly sure what the problem is for you, but iirc the fa_hiveMaintenance error was in overwatch even before the new patch ... i cant remeber what it was and why tho.

alright maybe it was there and just buried because my RPT is suddenly over a mb in size and im pretty sure I had most of the errors sorted. I'll keep looking for other errors but Im not seeing anything related to your script.

 

Just did another look through and im only seeing the above errors, a small error in my loot table, and an error in the playerdied.sqf.

Link to comment
Share on other sites

  • 0

i made a quite stupid mistake in the script and thats why it dosnt work (it matters what way you turn "<" or ">")  :P

 

this is tested on old beta and works:

if(!isServer)exitWith{};
if(isServer)then{
	//start timer, time before script starts ... could be adjusted
	sleep 300;
	diag_log "ANTIPARA: Starting loop!";
	_debug = getMarkerpos "respawn_west";
	while {true} do {
		_allParachutes = (entities "ParachuteBase");
		if(count _allParachutes > 0)then{
			{
				_chute = _x;
				if(count (crew _chute) < 1 and _chute distance _debug > 250)then{
					if((typeOf _chute) in ["ParachuteMediumWest","ParachuteMediumWest"] and ((getPosATL _chute) select 2) > 1)then{
						diag_log format["ANTIPARA: Skipping: '%1' '%2' - (%3) %4",_chute,typeOf _chute,mapGridPosition _chute,getPos _chute];
					}else{
						//comment this log out, when it seems to work
						diag_log format["ANTIPARA: '%1' '%2' - (%3) %4",_chute,typeOf _chute,mapGridPosition _chute,getPos _chute];
						detach _chute;
						_chute setPos _debug;
						_chute setDamage 1;
						deleteVehicle _chute;
					};
				};
			}forEach _allParachutes;
		};
		//more time here, the longer inbetween cleanup cycles but will save server resources
		//less time will clean faster, but might have impact on server performance
		sleep (5 + (random 15));
	};
};
Link to comment
Share on other sites

  • 0

Well Halv, good news it works! Bad news, I think its messing up DZMS somehow. I can't confirm it as of yet, but I have no DZMS errors in my database yet 2 of the missions spawned with no ai and the mission is unable to be completed. Im gonna test and confirm or refute this theory and report back to you.

Link to comment
Share on other sites

  • 0

Yea I was wrong about their not being any errors regarding DZMS in my RPT. I used an incorrect classname on 2 of the vehicles I had spawning at missions. Those 2 particular vehicles dont exist in overwatch. I changed out those classnames and everything seems to be running fine.  I think this does slightly impact server performance especially when 30+ people are on the server. I'd like to increase the time in between the cleanups...

sleep (5 + (random 15));

are these minutes or seconds?  If I made it say 10 and random 20, would that mean the script runs every 10-30 minutes? Is the random being added to the base or is it adding a random maximum.. In other words would it be 10-20 minutes or 10-30, assuming these are minutes an not seconds?

Link to comment
Share on other sites

  • 0

Yea I was wrong about their not being any errors regarding DZMS in my RPT. I used an incorrect classname on 2 of the vehicles I had spawning at missions. Those 2 particular vehicles dont exist in overwatch. I changed out those classnames and everything seems to be running fine.  I think this does slightly impact server performance especially when 30+ people are on the server. I'd like to increase the time in between the cleanups...

sleep (5 + (random 15));

are these minutes or seconds?  If I made it say 10 and random 20, would that mean the script runs every 10-30 minutes? Is the random being added to the base or is it adding a random maximum.. In other words would it be 10-20 minutes or 10-30, assuming these are minutes an not seconds?

 

The sleep function is in seconds.

Link to comment
Share on other sites

  • 0

I set it to 60 seconds, but it's up to you how long you want it to wait.

 

The parachutes disappear locally to the person who was using it, but not to all the other clients connected, so unless you see another person who just got done parachuting, the player shouldn't notice it as long as the script is running at least once a minute.

Link to comment
Share on other sites

  • 0

yea Im not worried about them instantly deleting, just want them to delete before it gets out of hand... Balota seems to be the big PVP spot on my server and before this script the amount of parachutes that piled up was insane. Not to mention, if they collide with a player they injure/kill them.. this was very problematic especialyl when players landed on building tops.

 

Now Im just having crazy database issues when people die the death doesnt always record to the database and people occasionally respawn fully geared near their body. This is out of the blue and all of the sudden. If it's not 1 thing its 10

Link to comment
Share on other sites

  • 0

I believe 125548 fixes this issue. This is what I was using before.

if(!isServer)exitWith{};
if(isServer)then{
	//start timer, time before script starts ... could be adjusted
	sleep 300;
	diag_log "ANTIPARA: Starting loop!";
	_debug = getMarkerpos "respawn_west";
	while {true} do {
		_allParachutes = (entities "ParachuteBase");
		if(count _allParachutes > 0)then{
			{
				_chute = _x;
				if(count (crew _chute) < 1 and _chute distance _debug > 250)then{
					if((typeOf _chute) in ["ParachuteMediumWest","ParachuteMediumWest"] and ((getPosATL _chute) select 2) > 1)then{
						diag_log format["ANTIPARA: Skipping: '%1' '%2' - (%3) %4",_chute,typeOf _chute,mapGridPosition _chute,getPos _chute];
					}else{
						//comment this log out, when it seems to work
						diag_log format["ANTIPARA: '%1' '%2' - (%3) %4",_chute,typeOf _chute,mapGridPosition _chute,getPos _chute];
						detach _chute;
						_chute setPos _debug;
						_chute setDamage 1;
						deleteVehicle _chute;
					};
				};
			}forEach _allParachutes;
		};
		//more time here, the longer inbetween cleanup cycles but will save server resources
		//less time will clean faster, but might have impact on server performance
		sleep (5 + (random 15));
	};
};
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...