Jump to content
  • 0
StiflersM0M

[REQUEST] Remove every vehicle who is not near a plot ploe ?

Question

Hey hey,

Only a idea probably there is anyway a script out there if it is so, please send me a link :)

It would be nice to have a script which delete every vehicle which is not near a plot pole, i hate it if person play one time on a server and then let their vehicle everywhere, mostly theese vehicle got every day updated in the database cause anyone try to get in in this vehicle so the regualar abodened cleanup wont work.

How i said its just a request :)

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Something quicly written ( should work if no typo's)

 

Add it to your admin tools ot AH, ot tweak it to run server sided on restart? , idk what u want specific ^^

//execute this as an admin
//execVM "deleteVechicles.sqf";

_center = getMarkerPos "center";
_allVehicles = _center nearEntities [["AllVehicles"], 12000]; // increase size for other maps ofcoruse if needed
{
	if ( (!isNull _x) && !(_x isKindOf "CAManBase") && !(isPlayer _x) &&  !(isPlayer (driver _x)) ) then {		
		if( _x isKindOf "Air" || _x isKindOf "Land" || _x isKindOf "Ship" ) then {
				_findNearestPoles = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], DZE_PlotPole select 0];
				_IsNearPlot = count (_findNearestPoles);
				if(_IsNearPlot == 0)then{
				   deleteVehicle _x;
				}	
		};				
	};	    
} count _allVehicles;

Share this post


Link to post
Share on other sites
  • 0

Just as a side not to this, it won't permanently delete the vehicles.

yes but you could set damage 1; do destroy it and delete all vehicles with damage 1 in the database.

set damage 1 is working, the only problem is that the script seems to delete every vehicle.

Share this post


Link to post
Share on other sites
  • 0

after 2 months i got some scripting knowledge and modified zupa version a little bit :P

 

this here will work:

_center = getMarkerPos "center";
_allVehicles = _center nearEntities [["AllVehicles"], 20000];
{
	if ( (!isNull _x) && !(_x isKindOf "CAManBase") && !(isPlayer _x) &&  !(isPlayer (driver _x)) ) then {		
		if( _x isKindOf "Air" || _x isKindOf "Land" || _x isKindOf "Ship" ) then {
				_findNearestPoles = nearestObjects[_x, ["Plastic_Pole_EP1_DZ"],90];
				_IsNearPlot = count (_findNearestPoles);
				if(_IsNearPlot == 0)then{
				   _x setdamage 1;
				};	
		};				
	};	    
} count _allVehicles;

It will set the damage of vehicles who are not near a plot pole to 1; (destroyed) then just wait 1-2 minutes restart the server and everything is fine :)

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
Answer this question...

×   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 thegdog
      2:08:04 Error Type Any, expected String 2:08:04 File z\addons\dayz_server\compile\server_playerSync.sqf, line 41 2:08:12 Server: Object 3:54 not found (message 70) 2:08:12 "Server_PublishVehicle2 error: Wrong parameter format" 2:08:12 "Trader Menu: jeffdog (76561198147272349) purchased 1x BAF_Merlin_DZE into gear at Aircraft Trader for 1 ItemObsidian" 2:08:12 Error in expression <ceFoot = 0; trying to buy aircraft from the default aircraft trader.  never touched any of it and it giving this error.  no vehicle spawns.  it shows the arrow.  EDIT:  i tried other traders, all vehicles dont spawn when bought.
    • By webbie
      Hi all, Ive been looking for a while now for a vehicle flip script for a single player.
      Ive tried stuff ive used on previous servers but its not allowing the option so im guessing epoch has something that interferes with it.
      If anyone knows of a simple script to allow players to do this could you link it to me please,
      Thanks in advance.
      PS. Im aware the jacks flip vehicles but I actually  find this to be incredibly painstaking unless theirs a trick to it.
    • By Honey Bee
      Hallo zusammen,
      Die glorreiche Idee den Fahrzeugen das Volumen zu nehmen war jetzt nicht gerade der Bringer. Alle beschweren. Jetzt hab ich mal geschaut aber finde nix wo die Kapazität der Fahrzeuge drin steht. Jemand Erfahrung damit?
       
      Hi,
      how can i change the Vehicle capacity?
       
      THX
    • By Emeraldpointgaming
      If it is possible could  someone make a zombie base defense script?
      Like players could tie up zombies outside their base as a form of defense against base raids, i think this script would be a really cool feature.
      i will pay a little bit of money if i can get a script capable of this.
      just think how good a script like this would be!
    • By Zoranth
      Based on Hacked Vehicles release by @Bricktop and Additional code by @Hooty from here:
      This is my first release
      This mod and code is not all my original work. 
      Credits to: 
      @Bricktop for the "Hacked Vehicles" https://epochmod.com/forum/topic/43750-hacked-vehicles-1061/
      @Hooty for his input in Bricktop's release on how to install it differently and to add support for Virtual Garage.
      What I did is took their information and made it modular and easier to install / customize. This way, you just need to #include which weapon systems you want to add into each vehicle that you want to modify.
      >> DOWNLOAD HERE <<  CURRENTLY ON HOLD DUE TO UNFORESEEN ERROR
      Install Directions:
      1.    Copy the Vehicle_Weapons directory into the root of your dayz_server directory
      2.    Next paste
      #include "\z\addons\dayz_server\Vehicle_Weapons\Add_Vehicle_Weapons.sqf";    in dayz_server\system\sever_monitor.sqf under
      3.    Then paste
      #include "\z\addons\dayz_server\Vehicle_Weapons\Add_Vehicle_Weapons.sqf";  in dayz_server\compile\server_publishVehicle2.sqf under
      4.    Then paste
      #include "\z\addons\dayz_server\Vehicle_Weapons\Add_Vehicle_Weapons.sqf";   in dayz_server\compile\spawn_vehicles.sqf under
      Installation with Virtual Garage:
      If you have @salival's Virtual Garage installed then add :
      #include "\z\addons\dayz_server\Vehicle_Weapons\Add_Vehicle_Weapons.sqf";   to dayz_server\compile\garage\server_spawnVehicles.sqf under
      How To Customize:
      If you would like to create your very own weapons pack for a vehicle, use the following instructions:
      1. Make a copy of "\z\addons\dayz_server\Vehicle_Weapons\vehicles\Generic_Add_Weapon.sqf" rename it like "<vehicle_classname>_Add_Weapons.sqf". Replace the <vehicle_classname> with the actual classname of the vehicle you want to add weapons to.
      2. Comment out or Delete the Weapon_Systems that you do not want to use on your new vehicle.
      3. Make a new #include "\z\addons\dayz_server\Vehicle_Weapons\vehicles\<Class_Name>_Add_Weapons.sqf"; line with your new vehicle file and add it to "\z\addons\dayz_server\Vehicle_Weapons\Add_Vehicle_Weapons.sqf";
      4. In the new vehicle file you just made.  Rearrange the Weapon_Systems in an order that makes sense to you. For example, list all guns, then all missiles so they are grouped together in your scroll menu for easier selection.
      Adding / Restricting an Ammo Type
      For Weapon_Systems that have multiple ammo types, You can go into that specific file and comment out an ammo type or make an extra file with just the ammo you want if you want to restrict it from your server. Example:
      In the file: "\z\addons\dayz_server\Vehicle_Weapons\Vehicles\Weapon_Systems\D81_125mm_Cannon.sqf". You could comment out an Ammo Type as shown Below.
      If you do this, you will want to save that as a new file such as : "D81_125mm_Cannon_SABOT_ONLY.sqf.
      List of Vehicle Weapons and Ammo:
      WARNING: Not all Weapon Systems work with all vehicles. For example, You obviously do not want to put a "GBU12_Bomb_Launcher" on an "ArmoredSUV_PMC", or "MLRS Rocket System" on the "ArmoredSUV_PMC".
      These weapons spawn on the vehicle when purchased and remain after restart.  This does not work with admin spawned vehicles nor does it work (for now) with the Deploy Anything Mod.  I do not have Virtual Garage installed on my test server,so I am unable to test that but it should work.
      Have Fun
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...