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

Could you be very specific on how to do that please? I have absolutely no idea how. Thanks man

I know i know but Rolling back isn't an option really my server will become a ghost town overnight. If this is the only problem I'm having then it's not worth killing my server.

Link to comment
Share on other sites

  • 0

I run two full servers, i announced the rollback properly and put a guide on the website on how to do it, and it is still full :P

But well to do this i would have to be home and check the spawn function exactly, will do that shortly.

Basically you make

_object setPos [0,0,0];

_object setDamage 1;

Where your _object is the parachute used by the Halo function...

Gonna have a look when i get home :)

Link to comment
Share on other sites

  • 0

I don't have a steady regular player base. I rely almost entirely on randoms.

You might have to really dumb this down for me as this is a bit out of my league man. I do follow directions very well though :) Thanks for any help you can provide man

 

Post your halo drop script and we will modify it for you.

Link to comment
Share on other sites

  • 0

Post your halo drop script and we will modify it for you.

 

nvm his halo script, you wont get the entity from that anyways ... most likely best sollution will be a serverside while loop, checking for empty parachutes with an interval.

 

not to mention the fact that the new beta has problems deleteing ... hence the teleporting to debug and setdamage

Link to comment
Share on other sites

  • 0

Allright the place you are looking for is dayz_code/compile/BIS_fnc/fn_halo.sqf

 

That is the function handling it all..

Then in line 16 replace the deletevehicle thingy with what i posted above.

 

Finally place the file into your mission folder and redress the call to it in your custom compiles.sqf

 

That should work, but betterdead is right, the entire cleanup process is not working atm so you might get problems from that

Link to comment
Share on other sites

  • 0

Alright when I get home from work I'll have a look at this and give it a shot. I don't mind teleporting them out to debug as they don't really cause lag on the server. It's just insane when there's 100+ empty parachutes around. They have also on occasion collided with and killed players, which is actually kind of funny but yea.. Thanks gentlemen, I really would be lost if it wasn't for this awesome community and all the help that had been provided over the last year or so.

I wonder if infiSTAR could modify his "fix server fps" to delete these. I do use that from time to time and it does appear to be deleting objects.

Link to comment
Share on other sites

  • 0

nvm his halo script, you wont get the entity from that anyways ... most likely best sollution will be a serverside while loop, checking for empty parachutes with an interval.

 

not to mention the fact that the new beta has problems deleteing ... hence the teleporting to debug and setdamage

 

A loop is probably best, bit if the code he is using is spawning in an empty parachute and putting the player in it, it's an easy fix for that aspect.

 

Since he is talking about when they spawn in, I thought he may have a custom script for it.

Link to comment
Share on other sites

  • 0

I believe I followed user TorturedChunk's fix and followed option numbe 2. I can't be 100% sure since Im not in front of my files but here it is.

http://opendayz.net/threads/halo-jump-on-spawn-tutorial.9344/page-4#post-42865

 

to save you the trouble this is at the bottom of the init.sqf. I can't download and paste the actual HALO script(s) from my phone sorry I know the init isnt much help. But the first page of that link should be the files. When I get home I'll paste mine.

MC_BIS_halo_spawn = compile preprocessFileLineNumbers "fixes\haloInit.sqf";
private["_mkr"];
_mkr = "spawn" + str(round(random 4));
if (!isDedicated) then {
    [] spawn {
        waitUntil { !isNil ("dayz_Totalzedscheck") 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 (dayzPlayerLogin2 select 2) then
        {
            _pos = position player;
            _mkr setMarkerPos [_pos select 0, _pos select 1];
            player spawn MC_BIS_halo_spawn;
        };
    };
};
Link to comment
Share on other sites

  • 0

Ah nvm I got on my work pc. here they are

 

fn_halo.sqf

scriptName "modules_e\Functions\objects\fn_HALO.sqf";
/*
	File: fn_HALO.sqf
	Author: Karel Moricky

	Description:
	High Altitude Low Opening

	Parameter(s):
	_this:	ARRAY	- starts HALO jump directly
		OBJECT	- waits until unit in array is out of vehicle

	Returns:
	Nothing
*/

sleep 0.01;

//--- HALO -------------------------------------------------------------------------------------------------------------------------------------
if (typename _this == typename objnull) then {

	_unit = _this;

	//--- Eject!
	waituntil {(vehicle _unit) iskindof "ParachuteBase" || !isnil {_unit getvariable "bis_fnc_halo_now"}};
	if (!local _unit) exitwith {};

	//--- Delete parachute
	_parachute = vehicle _unit;
	if (_parachute != _unit) then {
		deletevehicle _parachute;
	};

	//--- Init
	_dir = ([[0,0,0],velocity _unit] call bis_fnc_dirto);
	_unit setdir _dir;
	_unit switchmove "HaloFreeFall_non";

	//--- Key controls
	if (_unit == player) then {
		//--- PLAYER ------------------------------------------------

		_brightness = 0.99;
		_pos = position player;
		_parray = [
		/* 00 */		["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 13, 0],
		/* 01 */		"",
		/* 02 */		"Billboard",
		/* 03 */		1,
		/* 04 */		3,
		/* 05 */		[0,0,-200],
		/* 06 */		wind,
		/* 07 */		0,
		/* 08 */		1.275,
		/* 09 */		1,
		/* 10 */		0,
		/* 11 */		[100],
		/* 12 */		[
							[_brightness,_brightness,_brightness,0],
							[_brightness,_brightness,_brightness,0.01],
							[_brightness,_brightness,_brightness,0.10],
							[_brightness,_brightness,_brightness,0]
						],
		/* 13 */		[1000],
		/* 14 */		0,
		/* 15 */		0,
		/* 16 */		"",
		/* 17 */		"",
		/* 18 */		player
		];
		bis_fnc_halo_clouds = "#particlesource" createVehicleLocal _pos;  
		bis_fnc_halo_clouds setParticleParams _parray;
		bis_fnc_halo_clouds setParticleRandom [0, [100, 100, 0], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 1];
		bis_fnc_halo_clouds setParticleCircle [00, [00, 00, 00]];
		bis_fnc_halo_clouds setDropInterval (0.4 - (0.3 * overcast));


		//--- Effects
		bis_fnc_halo_ppRadialBlur = ppeffectcreate ["RadialBlur",464];
		bis_fnc_halo_ppRadialBlur ppEffectAdjust [0.01,0.01,0.3,0.3];
		bis_fnc_halo_ppRadialBlur ppEffectCommit 0.01;
		bis_fnc_halo_ppRadialBlur ppEffectEnable true ; 
		bis_fnc_halo_soundLoop = time;
		playsound "BIS_HALO_Flapping";

		bis_fnc_halo_action = _unit addaction [localize "STR_HALO_OPEN_CHUTE","fixes\fn_HALO.sqf",[],1,true,true,"Eject"];

		bis_fnc_halo_keydown = {
			_key = _this select 1;

			//--- Forward
			//if (_key in (actionkeys 'HeliForward')) then {
			if (_key in (actionkeys 'MoveForward')) then {
				if (bis_fnc_halo_vel < +bis_fnc_halo_velLimit) then {bis_fnc_halo_vel = bis_fnc_halo_vel + bis_fnc_halo_velAdd};
			};

			//--- Backward
			//if (_key in (actionkeys 'HeliBack')) then {
			if (_key in (actionkeys 'MoveBack')) then {
				if (bis_fnc_halo_vel > -bis_fnc_halo_velLimit) then {bis_fnc_halo_vel = bis_fnc_halo_vel - bis_fnc_halo_velAdd};
			};

			//--- Left
			//if (_key in (actionkeys 'HeliCyclicLeft')) then {
			if (_key in (actionkeys 'TurnLeft')) then {
				if (bis_fnc_halo_dir > -bis_fnc_halo_dirLimit) then {bis_fnc_halo_dir = bis_fnc_halo_dir - bis_fnc_halo_dirAdd};
			};

			//--- Right
			//if (_key in (actionkeys 'HeliCyclicRight')) then {
			if (_key in (actionkeys 'TurnRight')) then {
				if (bis_fnc_halo_dir < +bis_fnc_halo_dirLimit) then {bis_fnc_halo_dir = bis_fnc_halo_dir + bis_fnc_halo_dirAdd};
			};
		};
		bis_fnc_halo_keydown_eh = (finddisplay 46) displayaddeventhandler ["keydown","_this call bis_fnc_halo_keydown;"];

		//--- Loop
		bis_fnc_halo_vel = 0;
		bis_fnc_halo_velLimit = 0.2;
		bis_fnc_halo_velAdd = 0.03;
		bis_fnc_halo_dir = 0;
		bis_fnc_halo_dirLimit = 1;
		bis_fnc_halo_dirAdd = 0.06;

		[] spawn {
			_time = time - 0.1;
			while {alive player && vehicle player == player && isnil {player getvariable "bis_fnc_halo_terminate"}} do {

				//--- FPS counter
				_fpsCoef = ((time - _time) * 60) / acctime; //Script is optimized for 60 FPS
				_time = time;

				bis_fnc_halo_velLimit = 0.2 * _fpsCoef;
				bis_fnc_halo_velAdd = 0.03 * _fpsCoef;
				bis_fnc_halo_dirLimit = 1 * _fpsCoef;
				bis_fnc_halo_dirAdd = 0.06 * _fpsCoef;

				//--- Dir
				bis_fnc_halo_dir = bis_fnc_halo_dir * 0.98;
				_dir = direction player + bis_fnc_halo_dir;
				player setdir _dir;

				//--- Velocity
				_vel = velocity player;
				bis_fnc_halo_vel = bis_fnc_halo_vel * 0.96;
				player setvelocity [
					(_vel select 0) + (sin _dir * bis_fnc_halo_vel),
					(_vel select 1) + (cos _dir * bis_fnc_halo_vel),
					(_vel select 2)
				];

				//--- Animation system
				_anim = "HaloFreeFall_non";
				_v = bis_fnc_halo_vel;
				_h = bis_fnc_halo_dir;

				_vLimit = 0.1;
				_hLimit = 0.3;
				if ((abs _v) > _vLimit || (abs _h) > _hLimit) then {
					_vAnim = "";
					if (_v > +_vLimit) then {_vAnim = "F"};
					if (_v < -_vLimit) then {_vAnim = "B"};
					_hAnim = "";
					if (_h > +_hLimit) then {_hAnim = "R"};
					if (_h < -_hLimit) then {_hAnim = "L"};
					_anim = "HaloFreeFall_" + _vAnim + _hAnim;
				};

				player playmovenow _anim;

				//--- Sound
				if ((time - bis_fnc_halo_soundLoop) > 4.5) then {
					playsound "BIS_HALO_Flapping";
					bis_fnc_halo_soundLoop = time;
				};

				//--- Effects
				bis_fnc_halo_ppRadialBlur ppEffectAdjust [0.02,0.02,0.3 - (bis_fnc_halo_vel/7)/_fpsCoef,0.3 - (bis_fnc_halo_vel/7)/_fpsCoef];
				bis_fnc_halo_ppRadialBlur ppEffectCommit 0.01;
				sleep 0.01;
			};
			//--- End
			player removeaction bis_fnc_halo_action;
			(finddisplay 46) displayremoveeventhandler ["keydown",bis_fnc_halo_keydown_eh];
			ppeffectdestroy bis_fnc_halo_ppRadialBlur;
			deletevehicle bis_fnc_halo_clouds;

			bis_fnc_halo_clouds = nil;
			bis_fnc_halo_vel = nil;
			bis_fnc_halo_velLimit = nil;
			bis_fnc_halo_velAdd = nil;
			bis_fnc_halo_dir = nil;
			bis_fnc_halo_dirLimit = nil;
			bis_fnc_halo_dirAdd = nil;
			bis_fnc_halo_action = nil;
			bis_fnc_halo_keydown = nil;
			bis_fnc_halo_keydown_eh = nil;

			if (!alive player) then {
				player switchmove "adthppnemstpsraswrfldnon_1";
				player setvelocity [0,0,0];
			};
		};
	} else {
		//--- AI ------------------------------------------------
		while {(position _unit select 2) > 100} do {
			_destination = expecteddestination _unit select 0;
			if (_destination distance [position _unit select 0,position _unit select 1,0] > 10) then {
				_vel = velocity _unit;
				_dirTo = [_unit,_destination] call bis_fnc_dirto;
				if (player distance _unit > 500) then {
					_unit setdir _dirTo;
				};
				_unit setvelocity [
					(_vel select 0) + (sin _dirTo * 0.2),
					(_vel select 1) + (cos _dirTo * 0.2),
					(_vel select 2)
				];
			};
			sleep 0.01;
		};

		//--- Open
		[_unit] spawn bis_fnc_halo;
	};
};

//--- PARA -------------------------------------------------------------------------------------------------------------------------------------
if (typename _this == typename []) then {

	_unit = _this select 0;
	if (!local _unit) exitwith {};

	//--- Free fall
	if (count _this == 2) exitwith {
		_alt = _this select 1;
		_unit setpos [position _unit select 0,position _unit select 1,_alt];
		_unit setvariable ["bis_fnc_halo_now",true];
		_unit spawn bis_fnc_halo;
	};
	//-------------

	_para = "ParachuteWest" createVehicle position _unit;
	//_para = "BIS_Steerable_Parachute" createVehicle position _unit;
	_para setpos position _unit;
	_para setdir direction _unit;
	_vel = velocity _unit;
	_unit moveindriver _para;
	//_unit moveingunner _para;
	_para lock false;

	bis_fnc_halo_para_dirAbs = direction _para;

	//--- Key controls
	if (_unit == player) then {
		_para setvelocity [(_vel select 0),(_vel select 1),(_vel select 2)*1];

		bis_fnc_halo_DynamicBlur = ppeffectcreate ["DynamicBlur",464];
		bis_fnc_halo_DynamicBlur ppEffectEnable true;
		bis_fnc_halo_DynamicBlur ppEffectAdjust [8.0];
		bis_fnc_halo_DynamicBlur ppEffectCommit 0;
		bis_fnc_halo_DynamicBlur ppEffectAdjust [0.0];
		bis_fnc_halo_DynamicBlur ppEffectCommit 1;

		bis_fnc_halo_para_vel = 0;
		bis_fnc_halo_para_velLimit = 0.5;
		bis_fnc_halo_para_velAdd = 0.01;
		bis_fnc_halo_para_dir = 0;
		bis_fnc_halo_para_dirLimit = 1.5;
		bis_fnc_halo_para_dirAdd = 0.03;

		bis_fnc_halo_para_keydown = {
			_key = _this select 1;

			//--- Forward
			if (_key in (actionkeys 'MoveForward')) then {
				if (bis_fnc_halo_para_vel < +bis_fnc_halo_para_velLimit) then {bis_fnc_halo_para_vel = bis_fnc_halo_para_vel + bis_fnc_halo_para_velAdd};
			};

			//--- Backward
			if (_key in (actionkeys 'MoveBack')) then {
				if (bis_fnc_halo_para_vel > -bis_fnc_halo_para_velLimit*0) then {bis_fnc_halo_para_vel = bis_fnc_halo_para_vel - bis_fnc_halo_para_velAdd};
			};

			//--- Left
			if (_key in (actionkeys 'TurnLeft')) then {
				if (bis_fnc_halo_para_dir > -bis_fnc_halo_para_dirLimit) then {bis_fnc_halo_para_dir = bis_fnc_halo_para_dir - bis_fnc_halo_para_dirAdd};
			};

			//--- Right
			if (_key in (actionkeys 'TurnRight')) then {
				if (bis_fnc_halo_para_dir < +bis_fnc_halo_para_dirLimit) then {bis_fnc_halo_para_dir = bis_fnc_halo_para_dir + bis_fnc_halo_para_dirAdd};
			};
		};
		bis_fnc_halo_para_loop_time = time - 0.1;
		bis_fnc_halo_para_velZ = velocity _para select 2;
		bis_fnc_halo_para_loop = {
				if (!isnil {player getvariable "bis_fnc_halo_terminate"}) exitwith {};
				if (time == bis_fnc_halo_para_loop_time) exitwith {}; //--- FPS too high

				_para = vehicle player;

				//--- FPS counter
				_fpsCoef = ((time - bis_fnc_halo_para_loop_time) * 20) / acctime; //Script is optimized for 20 FPS
				bis_fnc_halo_para_loop_time = time;

				//_fpsCoef = _fpsCoef / 3;
				bis_fnc_halo_para_velLimit = 0.3 * _fpsCoef;
				bis_fnc_halo_para_velAdd = 0.002 * _fpsCoef;
				bis_fnc_halo_para_dirLimit = 1.5 * _fpsCoef;
				bis_fnc_halo_para_dirAdd = 0.03 * _fpsCoef;

				//--- Dir
				bis_fnc_halo_para_dir = bis_fnc_halo_para_dir * 0.98;
				bis_fnc_halo_para_dirAbs = bis_fnc_halo_para_dirAbs + bis_fnc_halo_para_dir;
				_para setdir bis_fnc_halo_para_dirAbs;
				_dir = direction _para;

				//--- Crash
				_velZ = velocity _para select 2;
				if ((_velZ - bis_fnc_halo_para_velZ) > 7 && (getposatl _para select 2) < 100) then {player setdamage 1;debuglog ["Log::::::::::::::",(_velZ - bis_fnc_halo_para_velZ)];};
				bis_fnc_halo_para_velZ = _velZ;

				//--- Pos
				_para setposasl [
					(getposasl _para select 0) + (sin _dir * (0.1 + bis_fnc_halo_para_vel)),
					(getposasl _para select 1) + (cos _dir * (0.1 + bis_fnc_halo_para_vel)),
					(getposasl _para select 2) - 0.01 - 0.1 * abs bis_fnc_halo_para_vel
				];

				[
					_para,
					(-bis_fnc_halo_para_vel * 75) + 0.5*(sin (time * 180)),
					(+bis_fnc_halo_para_dir * 25) + 0.5*(cos (time * 180))
				] call bis_fnc_setpitchbank;
		};

		bis_fnc_halo_para_mousemoving_eh = (finddisplay 46) displayaddeventhandler ["mousemoving","_this call bis_fnc_halo_para_loop;"];
		bis_fnc_halo_para_mouseholding_eh = (finddisplay 46) displayaddeventhandler ["mouseholding","_this call bis_fnc_halo_para_loop;"];

		sleep 4;

		ppeffectdestroy bis_fnc_halo_DynamicBlur;
		bis_fnc_halo_para_keydown_eh = (finddisplay 46) displayaddeventhandler ["keydown","_this call bis_fnc_halo_para_keydown;"];

		//--- End
		//waituntil {vehicle player == player};
		player setvariable ["bis_fnc_halo_terminate",nil];
		waituntil {(position vehicle player select 2) < 2 || !isnil {player getvariable "bis_fnc_halo_terminate"}};
		(finddisplay 46) displayremoveeventhandler ["keydown",bis_fnc_halo_para_keydown_eh];
		(finddisplay 46) displayremoveeventhandler ["mousemoving",bis_fnc_halo_para_mousemoving_eh];
		(finddisplay 46) displayremoveeventhandler ["mouseholding",bis_fnc_halo_para_mouseholding_eh];

		bis_fnc_halo_para_vel = nil;
		bis_fnc_halo_para_velLimit = nil;
		bis_fnc_halo_para_velAdd = nil;
		bis_fnc_halo_para_dir = nil;
		bis_fnc_halo_para_dirLimit = nil;
		bis_fnc_halo_para_dirAdd = nil;
		bis_fnc_halo_para_keydown = nil;
		bis_fnc_halo_para_loop = nil;
		bis_fnc_halo_para_keydown_eh = nil;
		bis_fnc_halo_para_mousemoving_eh = nil;
		bis_fnc_halo_para_mouseholding_eh = nil;
	};
};

haloInit.sqf

player spawn bis_fnc_halo;
player action [ "eject", vehicle player];

Link to comment
Share on other sites

  • 0

 

not sure if entities "ParachuteWest" will work, but try this:

if(isServer)then{
	while {true} do {
		{
			if(count (crew _x) < 1 and _x distance [0,0,0] > 250)then{
				_x setPos [0,0,0];
				_x setDamage 1;
			};
		}forEach (entities "ParachuteWest");
		sleep 5;
	};
};

Is this modifying an existing section of the haloinit.sqf or am I creating a new section near the bottom for this?

Link to comment
Share on other sites

  • 0

Is this modifying an existing section of the haloinit.sqf or am I creating a new section near the bottom for this?

 

make a new file and add that into it, then exceVM whateveryoucalledthefile.sqf right above this line:

MC_BIS_halo_spawn = compile preprocessFileLineNumbers "fixes\haloInit.sqf";

Link to comment
Share on other sites

  • 0

 

not sure if entities "ParachuteWest" will work, but try this:

if(isServer)then{
	while {true} do {
		{
			if(count (crew _x) < 1 and _x distance [0,0,0] > 250)then{
				_x setPos [0,0,0];
				_x setDamage 1;
			};
		}forEach (entities "ParachuteWest");
		sleep 5;
	};
};

This seems to have done the trick man. I appreciate it as always.

Link to comment
Share on other sites

  • 0

This seems to have done the trick man. I appreciate it as always.

 

im glad you could test it, i didnt have the time to do it myself, and i dont intend to use the new bata patch before i absolutely have to or there is an update for this mess.

 

try this to save some resources on the server:

if(isServer)then{
	//start timer, time before script starts ... could be adjusted, 600 might be overkill
	sleep 600;
	[] spawn {
		while {true} do {
			{
				if(count (crew _x) < 1 and _x distance [0,0,0] > 250)then{
					//comment this log out, when it seems to work
					diag_log format["ANTIPARA: '%1' '%2' - (%3) %4",typeOf _x,_x,mapGridPosition _x,getPos _x];
					_x setPos [0,0,0];
					_x setDamage 1;
					deleteVehicle _x;
				};
			}forEach (entities "ParachuteWest");
			//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

ah yea I spoke too soon on that first one man. I think the antihack is blocking the script. It deletes my parachute just fine but no one elses. Any idea how I'd whitelist it, assuming thats the issue?

 

Edit- also, Im using the latest version infiSTAR sent me and the fix server fps does not seem to be deleting parachutes as someone said earlier.

 

When I go to delete one of the parachutes manually its parachuteC if that makes any difference

Link to comment
Share on other sites

  • 0

ah yea I spoke too soon on that first one man. I think the antihack is blocking the script. It deletes my parachute just fine but no one elses. Any idea how I'd whitelist it, assuming thats the issue?

 

Edit- also, Im using the latest version infiSTAR sent me and the fix server fps does not seem to be deleting parachutes as someone said earlier.

 

When I go to delete one of the parachutes manually its parachuteC if that makes any difference

 

ill change it to check for both types, but im cautious about using parachutebase, cause it will delete my airdrop parachutes aswell, since they dont have any passengers

 

meanwhile try change this:

}forEach (entities "ParachuteWest");

to this:

}forEach (entities "ParachuteC");

try this:

if(isServer)then{
	//start timer, time before script starts ... could be adjusted
	sleep 300;
	[] spawn {
		while {true} do {
			_allPWest = (entities "ParachuteWest");
			if(count _allPWest < 0)then{
				{
					if(count (crew _x) < 1 and _x distance [0,0,0] > 250)then{
						//comment this log out, when it seems to work
						diag_log format["ANTIPARA: '%1' '%2' - (%3) %4",typeOf _x,_x,mapGridPosition _x,getPos _x];
						_x setPos [0,0,0];
						_x setDamage 1;
						deleteVehicle _x;
					};
				}forEach _allPWest;
			};
			_allPC = (entities "ParachuteC");
			if(count _allPC < 0)then{
				{
					if(count (crew _x) < 1 and _x distance [0,0,0] > 250)then{
						//comment this log out, when it seems to work
						diag_log format["ANTIPARA: '%1' '%2' - (%3) %4",typeOf _x,_x,mapGridPosition _x,getPos _x];
						_x setPos [0,0,0];
						_x setDamage 1;
						deleteVehicle _x;
					};
				}forEach _allPC;
			};
			//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

 

ill change it to check for both types, but im cautious about using parachutebase, cause it will delete my airdrop parachutes aswell, since they dont have any passengers

 

meanwhile try change this:

}forEach (entities "ParachuteWest");

to this:

}forEach (entities "ParachuteC");

try this:

if(isServer)then{
	//start timer, time before script starts ... could be adjusted
	sleep 300;
	[] spawn {
		while {true} do {
			_allPWest = (entities "ParachuteWest");
			if(count _allPWest < 0)then{
				{
					if(count (crew _x) < 1 and _x distance [0,0,0] > 250)then{
						//comment this log out, when it seems to work
						diag_log format["ANTIPARA: '%1' '%2' - (%3) %4",typeOf _x,_x,mapGridPosition _x,getPos _x];
						_x setPos [0,0,0];
						_x setDamage 1;
						deleteVehicle _x;
					};
				}forEach _allPWest;
			};
			_allPC = (entities "ParachuteC");
			if(count _allPC < 0)then{
				{
					if(count (crew _x) < 1 and _x distance [0,0,0] > 250)then{
						//comment this log out, when it seems to work
						diag_log format["ANTIPARA: '%1' '%2' - (%3) %4",typeOf _x,_x,mapGridPosition _x,getPos _x];
						_x setPos [0,0,0];
						_x setDamage 1;
						deleteVehicle _x;
					};
				}forEach _allPC;
			};
			//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));
		};
	};
};

No joy, same problem as the last one I believe. Deletes my parachute, no one elses.

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