Jump to content
FreakingFred

[FIX] Automatically Eject Players From Blown Up Vehicles

Recommended Posts

We have ran into the following two issues regarding blown up vehicles on our server:

  1. Players get stuck in blown up vehicles, and are actually unable to eject.
  2. Players refuse to eject from a blown up vehicle, as a way to avoid combat.

These are the steps I took to fix this issue:

  1. Navigate to dayz_server\compile.
  2. Open server_updateObject.sqf with your text editor of choice.
  3. CTRL+F and search for the following:
    _object_killed = {
    	private["_hitpoints","_array","_hit","_selection","_key","_damage"];

     

  4. Under that, copy and paste the following:
    if((count crew _object) > 0) then{
    	{ moveOut _x } forEach crew _object;
    };

     

  5. Save and done.

 

This has been tested a decent amount over the past few restarts on my server, and has been reported to be working by the players.  The only small issue we have found, is that when it gets close to a server restart, and there are 60-70 players online, it can sometimes take up to 20-30 seconds to eject the player(s).  If anyone has any suggestions on how to do this better, then please feel free to share.  Hopefully, this helps a few people.  Enjoy!

Share this post


Link to post
Share on other sites

Nice fix!

It'll work fine in 1.0.5.1 but in 1.0.6 this fix has already been added to the BIS_Effects files, which are executed by the client and should have no delay when the server becomes laggy (this fix also kills the player in the crash/explosion). Keep in mind that you can use the bis_effects files from 1.0.6 with 1.0.5.1 but some vehicles do not properly execute the BIS_Effects in 1.0.5.1 so vehicles like tanks, boats, some pooks and the CH53 will still not be fixed (configs have been fixed for 1.0.6 so all vehicles call BIS_Effects properly).  Once 1.0.6 comes out you will need to remove the fix in the OP from your server.

 

If you are looking to use the 1.0.6 files early you will need to set 2 variables:

DZE_SafeZonePosArray = []; //Nested array of safezone positions to excluded from killing the player and radii i.e. [[[posx,posy,posz], radius], [[posx,posy,posz], radius]];

DZE_NoVehicleExplosions = false; //set to true to disable vehicle explosions which should reduce griefing by ramming, other vehicles may still be destroyed if rammed.

 

You will probably be able to combine the effects of the OP fix and 1.0.6 fix so that 1.0.6 picks up where the op's fix is too delayed and the op's fix picks up where vehicles do not call the BIS_Effects files properly. 

 

https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/system/BIS_Effects/killed.sqf

Share this post


Link to post
Share on other sites

Hey,

For what it's worth this didn't work for me.

I had to change it to the following code to actually eject them.

 

	if ((count crew _object) > 0) then {
		{ _x action ["Eject",_object];  } forEach crew _object;
	};

 

Share this post


Link to post
Share on other sites
5 hours ago, salival said:

Hey,

For what it's worth this didn't work for me.

I had to change it to the following code to actually eject them.

 

	if ((count crew _object) > 0) then {
		{ _x action ["Eject",_object];  } forEach crew _object;
	};

 

That is odd.  It is still working on my server.  Also, I was under the impression "moveOut" was the same thing as ejecting, just without an animation.  Like I stated in my first post, it can take longer to eject players if the server hasn't restarted in a while, or has a lot of players online.  On my test server, it ejects players instantly.  On my live server, with 70 people online, it can take 10+ seconds.  Let me know if anyone has gotten this to work on their server.  Thanks.

Share this post


Link to post
Share on other sites

@FreakingFred: I must apologise, I think your way and my way works the same. I was testing this with spawning in vehicles with infiSTAR, I don't think this puts the same handlers on the vehicle so it doesn't trigger this. If I grab a server spawned vehicle or a users vehicle it works fine.

Share this post


Link to post
Share on other sites
12 hours ago, salival said:

@FreakingFred: I must apologise, I think your way and my way works the same. I was testing this with spawning in vehicles with infiSTAR, I don't think this puts the same handlers on the vehicle so it doesn't trigger this. If I grab a server spawned vehicle or a users vehicle it works fine.

yeah anything server spawned should work. Same thing for vehicle skins, they wont work if you spawn the vehicle in, but it will if you buy the vehicle fro the traders

Share this post


Link to post
Share on other sites

@oldmatechoc

Yea we just smack the ground, happened to myself. I have 60m height limit on bases and i was way above that. Since you suggested that it might be ESSv2 missing with it, its set at 150m. Thanks 

 

Share this post


Link to post
Share on other sites
Quote

That is odd.  It is still working on my server.  Also, I was under the impression "moveOut" was the same thing as ejecting, just without an animation.  Like I stated in my first post, it can take longer to eject players if the server hasn't restarted in a while, or has a lot of players online.  On my test server, it ejects players instantly.  On my live server, with 70 people online, it can take 10+ seconds.  Let me know if anyone has gotten this to work on their server.  Thanks.

Works great for me except air vehicles atm not giving a para.  At low pop time on my sever its pretty quick and high pop 50-60 players it does take longer, that's to be expected though. 

Share this post


Link to post
Share on other sites
On 7/31/2016 at 4:22 AM, salival said:

Hey,

For what it's worth this didn't work for me.

I had to change it to the following code to actually eject them.

 

	if ((count crew _object) > 0) then {
		{ _x action ["Eject",_object];  } forEach crew _object;
	};

 

Wow i missed this lol.  This fixed it Thanks guys.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By JakeQue
      Hi, me again.
       
      For some reason when i spawn in and collect coins or loadout the next time i disconnect and come back it puts me back into spawn and money is all disappeared. 

      There's no hive errors.
      The only error in the Server RPT is :
      And I have 2 errors in my client RPT. Looks like they relate to zsc but I have reinstalled it from scratch and still the same.
      and 
       
      Sorry to be such a noob with this one!!
    • By Tricks
      Hello community,
      Well last night I had a player message me on Discord asking for a free Lapua. He was very rude and insistent, then left all of a sudden. Some players were doing a mission and all of a sudden AI would spawn right on top of one of the players who then became invincible. I know the player and he was not hacking. He also had 999,999,999 coins and humanity on him. I restarted the server to fix the issue with the AI. Later anytime he accessed his safe, all the players on the server would explode into the air and die when they landed, not by the explosion. We later figured out it was the 2 Lapuas he took from the mission that were in his safe. I deleted them and it seems to have fixed the issue.
      Anyone else experienced this?
    • By ziggah
      I got DayZlauncher and I find a server, assign the Arma2 and click on it. It tells me which mods I need to download, so I do it (DayZ, Epoch and Overwatch). Not ethat I had these installed for like 2 years, so I only needed to update them.
      Click play on teh server after tehy're done only to get:
      Arma 2: Operation Arrowhead is attempting to launch with the optional parameters shown below.
      " -connect=172.106.106.33 -port=mod=C:\Program Files(x86)\Steam\SteamApps\Common\ArmA 2;Expansions;C:\Users\Ziggah\Documents\mods\@DayZ_Epoch" "
      If you did not request this launch or do not understand this options, select Cancel.
      Note, my arma 2 and arma 2 OA location is on D drive. I click ok. I get the "battleEye is installing thingey. I get it every time". I get another error message after that. a window titles "Arma 2 Army of the Czech republic Se..." with the message " !!! MISSING STRING" Have no clue what AotCR has anything to do with dayz so I click okay.
      After this I get a window titled "arma2 OA" with the message "Addon 'sauerland' requers addon 'Chernarus'" Again, I have no clue why I need an addon which is a part of the default game, so I click okay.
      I get the DayZ Epoch screen, you know it, the black one. After a while, bout half a minute I get:
      "No entry bin/congfig.bin/CfgVehicles/Land_Company3_2.scope"
      Then it fianlly, crashes with one last error, a window titled "Arma 2 OA" with the message "cannot load world 'ca\chernarus\chernarus.wrp'"
      Also, if it helps, my Mods/download path in dayzlauncher is "C:\Users\Ziggah\Documents\mods"
      I know I could google this, but such a huge batch with these specific combination of erros seems only specific to me. Or alteast no one asked on the internet yet and gave up on ever playing the game. Which I am close to. Can someone help me fix this errorfest of a game, please. I have about 1200 hours in epoch and I really wanna play it again. Seriously. I fix one error, BAM, now you got 2 more.
    • By salival
      Hi,
      Here's a script I wrote that does the following from right clicking your key in your toolbelt:
      Unlock/lock vehicle. Turn engine on/off. Eject players not in your group. This uses @mudzereliclick actions mod as a dependency (https://github.com/mudzereli/DayZEpochDeployableBike/tree/master/overwrites/click_actions) because it's awesome.
      Thanks to @Pattohfor the idea for this script.
      For downloading and install instructions, see my github: https://github.com/oiad/remoteVehicle
    • By SirRapplez
      Hello! So, I am not experienced with big server setups like that of ArmA's (so don't expect me to be too computer-smart), but I have come a long way with setting up my ArmA 3 server until I got to my BEC setup. I've gone through everything the instructions say and everything should all be connected and working, but...
      I keep getting and error saying: BePath is not a valid directory
      Now, i know this should be a simple fix, but no matter what i do the error won't go away!
      I'm using TADST for my server setup, so I'm using the Battleye directory stored there.
      the path I put in the config.cfg for BEC is:
      C:\Users\andre\Desktop\Arma3_server_stuff\server_files\TADST\SirRapplez\BattlEye
      (yes I made sure I didn't have an accidental space put in anywhere... I'm not that stupid)
      I also put a BeServer.cfg file in the same directory as the BeServer.dll with the following:
      RConPassword password
      RConPort 2309
      If anyone knows what my problem is, please help. I hope my question isn't super dumb, but I'm lost so, again, help would be much appreciated! Thanks.
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...