Jump to content
Halvhjearne

Delete vehicles parked in safezones on restart

Recommended Posts

the line is added on the wrong place. take a second look on the instructions

 

your code

           // total each vehicle
          serverVehicleCounter set [count serverVehicleCounter,_type];
      };
};      [_object] execVM "\z\addons\dayz_server\compile\Server_DeleteObjInsafezone.sqf";

might be unrelated to your problem thou...

 

Thanks i'll look into it, Like i said simple mistake.

Share this post


Link to post
Share on other sites

I would like to reduce the possible range it can teleport vehicles away, my safe zones are all 500m to make it very hard to camp them, but if I set the range to 500m then vehicles end up 1.5K's away sometimes, is there an easy way to reduce the possible maximum?

 

I assume it has something to do with this line?

 _radx4 = _Rad+_Rad+_Rad+_Rad;

Share this post


Link to post
Share on other sites

I would like to reduce the possible range it can teleport vehicles away, my safe zones are all 500m to make it very hard to camp them, but if I set the range to 500m then vehicles end up 1.5K's away sometimes, is there an easy way to reduce the possible maximum?

 

I assume it has something to do with this line?

 _radx4 = _Rad+_Rad+_Rad+_Rad;

 

it always moves them between area size and 4x area size away and yes, remove one of them, then it will only be moved 3x the area away

Share this post


Link to post
Share on other sites

Hello there, first would like to say, awesome script, took me a day to figure out a error i was getting, but got it to work. My question is this. After the vehicle has been moved to your safespot, is there a way to script in there, after so much, if the vehicle is not claimed it will be deleted, say like after 3 days or what ever you want to set it at?

Share this post


Link to post
Share on other sites
14 hours ago, DAKA said:

Hello there, first would like to say, awesome script, took me a day to figure out a error i was getting, but got it to work. My question is this. After the vehicle has been moved to your safespot, is there a way to script in there, after so much, if the vehicle is not claimed it will be deleted, say like after 3 days or what ever you want to set it at?

your sql events must delete this vehicles automatically if anyone do not move after X days

Share this post


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

Anyone tested this with 1.0.6 yet? I'll add it to my test server tonight and report back the results - it SHOULD work, might need some updated variables though..

I don't recall changing any variables to Server_DeleteObjInsafezone.sqf. It's been running without issues so far

Share this post


Link to post
Share on other sites
1 hour ago, Liquid84 said:

I don't recall changing any variables to Server_DeleteObjInsafezone.sqf. It's been running without issues so far

DOUBLE CONFIRMED then, worked for me as well on 1.0.6 - no changes required (other than adjusting the coordinates for aircraft dealer to NEAF for how my server is setup) - I tested all traders.

Share this post


Link to post
Share on other sites
31 minutes ago, DAKA said:

Will this work on 1061?

not to be rude lol but you should read the posts first... look right above yours  .. been confirmed by 2 people that it does

Share this post


Link to post
Share on other sites
35 minutes ago, theduke said:

not to be rude lol but you should read the posts first... look right above yours  .. been confirmed by 2 people that it does

Not to be rude but 106 and 1061 are slightly different. its confirmed to work on 106, if it works on 1061, why wouldn't they say, confirmed working on 1061. Im not running 106. I am running 1061.

Share this post


Link to post
Share on other sites
1 minute ago, DAKA said:

Not to be rude but 106 and 1061 are slightly different. its confirmed to work on 106, if it works on 1061, why wouldn't they say, confirmed working on 1061. Im not running 106. I am running 1061.

no variables have changed in 106 to 1061, just minor bug fixes

Share this post


Link to post
Share on other sites

well to keep it not so confusing maybe for newbies, don't you think we should use the correct version so others know. We all might know, but others might not. just saying.

Share this post


Link to post
Share on other sites
7 minutes ago, DAKA said:

well to keep it not so confusing maybe for newbies, don't you think we should use the correct version so others know. We all might know, but others might not. just saying.

sorry didnt realize you were a newbie. Since you didnt look in the proper place in the first place, ill do it for you

it is always good to try out script too

Share this post


Link to post
Share on other sites

So here is what the new line looks like in Server Monitor

                _serverVehicleCounter set [count _serverVehicleCounter,_type]; // total each vehicle
            } else {
                _object enableSimulation true;
            };

Were would you place the 

[_object] execVM "\z\addons\dayz_server\compile\Server_DeleteObjInsafezone.sqf";
 

Share this post


Link to post
Share on other sites
4 hours ago, DAKA said:

So here is what the new line looks like in Server Monitor

                _serverVehicleCounter set [count _serverVehicleCounter,_type]; // total each vehicle
            } else {
                _object enableSimulation true;
            };

Were would you place the 

[_object] execVM "\z\addons\dayz_server\compile\Server_DeleteObjInsafezone.sqf";

 

this is where i have mine

if (_object isKindOf "AllVehicles") then {
        _object setVariable ["lastInventory", _inventory];
            _object setVariable ["CharacterID", _ownerID, true];
            _isAir = _object isKindOf "Air";
            {
                _selection = _x select 0;
                _dam = if (!_isAir && {_selection in dayZ_explosiveParts}) then {(_x select 1) min 0.8;} else {_x select 1;};
                _strH = "hit_" + (_selection);
                _object setHit[_selection,_dam];
                _object setVariable [_strH,_dam,true];
            } foreach _hitpoints;
            [_object,"damage"] call server_updateObject;

            _object setFuel _fuel;
            if (!_isSafeObject) then {
                _DZE_VehObjects set [count _DZE_VehObjects,_object]; 
                _object call fnc_veh_ResetEH;
                
                
                if (_ownerID != "0" && {!(_object isKindOf "Bicycle")}) then {_object setVehicleLock "locked";};
                _serverVehicleCounter set [count _serverVehicleCounter,_type]; // total each vehicle
            } else {
                _object enableSimulation true;
            };
            [_object] execVM "\z\addons\dayz_server\compile\Server_DeleteObjInsafezone.sqf";
            
            
        } else {

Share this post


Link to post
Share on other sites
On 3/20/2017 at 11:31 PM, theduke said:

this is where i have mine

if (_object isKindOf "AllVehicles") then {
        _object setVariable ["lastInventory", _inventory];
            _object setVariable ["CharacterID", _ownerID, true];
            _isAir = _object isKindOf "Air";
            {
                _selection = _x select 0;
                _dam = if (!_isAir && {_selection in dayZ_explosiveParts}) then {(_x select 1) min 0.8;} else {_x select 1;};
                _strH = "hit_" + (_selection);
                _object setHit[_selection,_dam];
                _object setVariable [_strH,_dam,true];
            } foreach _hitpoints;
            [_object,"damage"] call server_updateObject;

            _object setFuel _fuel;
            if (!_isSafeObject) then {
                _DZE_VehObjects set [count _DZE_VehObjects,_object]; 
                _object call fnc_veh_ResetEH;
                
                
                if (_ownerID != "0" && {!(_object isKindOf "Bicycle")}) then {_object setVehicleLock "locked";};
                _serverVehicleCounter set [count _serverVehicleCounter,_type]; // total each vehicle
            } else {
                _object enableSimulation true;
            };
            [_object] execVM "\z\addons\dayz_server\compile\Server_DeleteObjInsafezone.sqf";
            
            
        } else {

im curious- can these vehicles be changed to wild spawns if not claimed after the 1st reset?  

meaning

1st reset its tp- it unlocks(player can locate vehicle and reclaim it, or another player could take it from the junkyard)

2nd reset its now a wild spawn--- i get vehicles that chill for 3 days before auto deleting- almost every vehicle that goes there people ask me to unlock it so they can go sell-   i tell them to hotwire it :)  but would like to have it a better way if possible.

Share this post


Link to post
Share on other sites
3 minutes ago, DieTanx said:

im curious- can these vehicles be changed to wild spawns if not claimed after the 1st reset?  

meaning

1st reset its tp- it unlocks(player can locate vehicle and reclaim it, or another player could take it from the junkyard)

2nd reset its now a wild spawn--- i get vehicles that chill for 3 days before auto deleting- almost every vehicle that goes there people ask me to unlock it so they can go sell-   i tell them to hotwire it :)  but would like to have it a better way if possible.

1- No, because if the vehicle becomes unlocked, no key is tied to it, therefore no way to search for the vehicle, cant be relocated

2- You could use salivals new version of this script, but in his comment, it says if you set the distance too large aka the whole map, it can give issues.  Thats why his script its set to pick up vehicles in the safezone, and drop them anywhere from 15m to 1000 m from the radius...  if you change that to 15m and 5000m  it could greatly reduce performance.

Share this post


Link to post
Share on other sites

Hello guys in 1.0.6.2 I am getting this error on restart was it I need to do to fix this? Thanks

7:42:47 "[VEHICLE CLEANUP ZONE]: VWGolf (Hatchback) by Trader City Klen @114039 [11434.8,11367.9,0.0206299] [ID:20,UID:0] Cargo: [[[],[]],[["ItemMorphine","PartGeneric"],[1,1]],[[],[]]]"
 7:42:47 "Server_DeleteObj error: Improper parameter format"
 7:42:47 "<infiSTAR.de> starting main server loop"
 7:42:48 "[VEHICLE CLEANUP ZONE]: CSJ_GyroP (AutoGyro) by Trader City Klen @114040 [11478.9,11340.5,-0.0010376] [ID:44,UID:0] Cargo: [[[],[]],[[],[]],[[],[]]]"
 7:42:48 "[VEHICLE CLEANUP ZONE]: CSJ_GyroP is Model to delete by default!"
 7:42:48 "Server_DeleteObj error: Improper parameter format"
 7:42:48 "[VEHICLE CLEANUP ZONE]: SUV_Silver (SUV Silver) by Trader City Bash @041037 [4132.47,11638.7,-0.00564575] [ID:45,UID:0] Cargo: [[["BAF_L86A2_ACOG"],[1]],[[],[]],[[],[]]]"
 7:42:48 "Server_DeleteObj error: Improper parameter format"
 7:42:49 "[VEHICLE CLEANUP ZONE]: GAZ_Vodnik_DZE (Vodnik (2xPK) AL) by Trader City Bash @040036 [4045.85,11672.7,0.0238037] [ID:99,UID:0] Cargo: [[[],[]],[["ItemHeatPack","equip_string","ItemBandage"],[1,1,1]],[[],[]]]"
 7:42:49 "Server_DeleteObj error: Improper parameter format"
 7:42:50 "[VEHICLE CLEANUP ZONE]: ArmoredSUV_PMC_DZE (SUV (Armored) AL) by Trader City Stary @063075 [6339.33,7787.95,-0.0137329] [ID:156,UID:0] Cargo: [[[],[]],[[],[]],[[],[]]]"
 7:42:50 "Server_DeleteObj error: Improper parameter format"
 7:42:50 "[VEHICLE CLEANUP ZONE]: HMMWV_M1151_M2_CZ_DES_EP1_DZE (HMMWV GPK (M2) AL) by Trader City Bash @040037 [4038.93,11654.2,0.0271301] [ID:163,UID:0] Cargo: [[[],[]],[[],[]],[[],[]]]"
 7:42:50 "Server_DeleteObj error: Improper parameter format"
 7:42:50 "[VEHICLE CLEANUP ZONE]: Offroad_DSHKM_Gue_DZE (Off-road (DShKM) AL) by Trader City Klen @114039 [11445.6,11369.8,-0.0124207] [ID:183,UID:0] Cargo: [[[],[]],[["FoodCanBeefEmpty","8Rnd_9x18_Makarov","PartGeneric"],[1,1,1]],[[],[]]]"
 7:42:50 "Server_DeleteObj error: Improper parameter format"
 7:42:51 "[VEHICLE CLEANUP ZONE]: Pickup_PK_INS_DZE (Pickup (PK) AL) by Trader City Stary @063075 [6334.45,7787.47,-0.00662231] [ID:190,UID:0] Cargo: [[[],[]],[["PartGeneric"],[1]],[[],[]]]"
 7:42:51 "Server_DeleteObj error: Improper parameter format"
 7:42:52 "[VEHICLE CLEANUP ZONE]: Pickup_PK_INS_DZE (Pickup (PK) AL) by Trader City Stary @062075 [6292.86,7807.28,-0.0106201] [ID:296,UID:0] Cargo: [[[],[]],[["FoodCanRusUnlabeled"],[1]],[[],[]]]"
 7:42:52 "Server_DeleteObj error: Improper parameter format"
 7:42:53 "[VEHICLE CLEANUP ZONE]: TT650_Civ (Motorcycle) by Trader City Stary @063075 [6305.52,7806.95,-0.0178528] [ID:314,UID:0] Cargo: [[[],[]],[[],[]],[[],[]]]"
 7:42:53 "[VEHICLE CLEANUP ZONE]: TT650_Civ is Model to delete by default!"
 7:42:53 "Server_DeleteObj error: Improper parameter format"
 7:42:53 "[VEHICLE CLEANUP ZONE]: Lada2_TK_CIV_EP1 (Lada (decorated)) by Boat Dealer East @134090 [13459.8,6289.11,0.000314236] [ID:324,UID:0] Cargo: [[[],[]],[["PartGlass"],[1]],[["DZ_CompactPack_EP1"],[1]]]"
 7:42:53 "Server_DeleteObj error: Improper parameter format"
 7:42:53 "[VEHICLE CLEANUP ZONE]: TT650_Civ (Motorcycle) by Trader City Stary @063075 [6306.33,7806.72,-0.0188599] [ID:332,UID:0] Cargo: [[[],[]],[[],[]],[[],[]]]"
 7:42:53 "[VEHICLE CLEANUP ZONE]: TT650_Civ is Model to delete by default!"
 7:42:53 "Server_DeleteObj error: Improper parameter format"
 7:42:53 "[VEHICLE CLEANUP ZONE]: V3S_RA_TK_GUE_EP1_DZE (V3S Reammo) by Trader City Stary @062075 [6292.99,7806.43,0.000701904] [ID:350,UID:0] Cargo: [[[],[]],[[],[]],[[],[]]]"
 7:42:53 "[VEHICLE CLEANUP ZONE]: V3S_RA_TK_GUE_EP1_DZE Un-Locked"
 7:42:53 "Server_DeleteObj error: Improper parameter format"

Share this post


Link to post
Share on other sites
35 minutes ago, Dr.Killmore said:

Hello guys in 1.0.6.2 I am getting this error on restart was it I need to do to fix this? Thanks

7:42:47 "[VEHICLE CLEANUP ZONE]: VWGolf (Hatchback) by Trader City Klen @114039 [11434.8,11367.9,0.0206299] [ID:20,UID:0] Cargo: [[[],[]],[["ItemMorphine","PartGeneric"],[1,1]],[[],[]]]"
 7:42:47 "Server_DeleteObj error: Improper parameter format"
 7:42:47 "<infiSTAR.de> starting main server loop"
 7:42:48 "[VEHICLE CLEANUP ZONE]: CSJ_GyroP (AutoGyro) by Trader City Klen @114040 [11478.9,11340.5,-0.0010376] [ID:44,UID:0] Cargo: [[[],[]],[[],[]],[[],[]]]"
 7:42:48 "[VEHICLE CLEANUP ZONE]: CSJ_GyroP is Model to delete by default!"
 7:42:48 "Server_DeleteObj error: Improper parameter format"
 7:42:48 "[VEHICLE CLEANUP ZONE]: SUV_Silver (SUV Silver) by Trader City Bash @041037 [4132.47,11638.7,-0.00564575] [ID:45,UID:0] Cargo: [[["BAF_L86A2_ACOG"],[1]],[[],[]],[[],[]]]"
 7:42:48 "Server_DeleteObj error: Improper parameter format"
 7:42:49 "[VEHICLE CLEANUP ZONE]: GAZ_Vodnik_DZE (Vodnik (2xPK) AL) by Trader City Bash @040036 [4045.85,11672.7,0.0238037] [ID:99,UID:0] Cargo: [[[],[]],[["ItemHeatPack","equip_string","ItemBandage"],[1,1,1]],[[],[]]]"
 7:42:49 "Server_DeleteObj error: Improper parameter format"
 7:42:50 "[VEHICLE CLEANUP ZONE]: ArmoredSUV_PMC_DZE (SUV (Armored) AL) by Trader City Stary @063075 [6339.33,7787.95,-0.0137329] [ID:156,UID:0] Cargo: [[[],[]],[[],[]],[[],[]]]"
 7:42:50 "Server_DeleteObj error: Improper parameter format"
 7:42:50 "[VEHICLE CLEANUP ZONE]: HMMWV_M1151_M2_CZ_DES_EP1_DZE (HMMWV GPK (M2) AL) by Trader City Bash @040037 [4038.93,11654.2,0.0271301] [ID:163,UID:0] Cargo: [[[],[]],[[],[]],[[],[]]]"
 7:42:50 "Server_DeleteObj error: Improper parameter format"
 7:42:50 "[VEHICLE CLEANUP ZONE]: Offroad_DSHKM_Gue_DZE (Off-road (DShKM) AL) by Trader City Klen @114039 [11445.6,11369.8,-0.0124207] [ID:183,UID:0] Cargo: [[[],[]],[["FoodCanBeefEmpty","8Rnd_9x18_Makarov","PartGeneric"],[1,1,1]],[[],[]]]"
 7:42:50 "Server_DeleteObj error: Improper parameter format"
 7:42:51 "[VEHICLE CLEANUP ZONE]: Pickup_PK_INS_DZE (Pickup (PK) AL) by Trader City Stary @063075 [6334.45,7787.47,-0.00662231] [ID:190,UID:0] Cargo: [[[],[]],[["PartGeneric"],[1]],[[],[]]]"
 7:42:51 "Server_DeleteObj error: Improper parameter format"
 7:42:52 "[VEHICLE CLEANUP ZONE]: Pickup_PK_INS_DZE (Pickup (PK) AL) by Trader City Stary @062075 [6292.86,7807.28,-0.0106201] [ID:296,UID:0] Cargo: [[[],[]],[["FoodCanRusUnlabeled"],[1]],[[],[]]]"
 7:42:52 "Server_DeleteObj error: Improper parameter format"
 7:42:53 "[VEHICLE CLEANUP ZONE]: TT650_Civ (Motorcycle) by Trader City Stary @063075 [6305.52,7806.95,-0.0178528] [ID:314,UID:0] Cargo: [[[],[]],[[],[]],[[],[]]]"
 7:42:53 "[VEHICLE CLEANUP ZONE]: TT650_Civ is Model to delete by default!"
 7:42:53 "Server_DeleteObj error: Improper parameter format"
 7:42:53 "[VEHICLE CLEANUP ZONE]: Lada2_TK_CIV_EP1 (Lada (decorated)) by Boat Dealer East @134090 [13459.8,6289.11,0.000314236] [ID:324,UID:0] Cargo: [[[],[]],[["PartGlass"],[1]],[["DZ_CompactPack_EP1"],[1]]]"
 7:42:53 "Server_DeleteObj error: Improper parameter format"
 7:42:53 "[VEHICLE CLEANUP ZONE]: TT650_Civ (Motorcycle) by Trader City Stary @063075 [6306.33,7806.72,-0.0188599] [ID:332,UID:0] Cargo: [[[],[]],[[],[]],[[],[]]]"
 7:42:53 "[VEHICLE CLEANUP ZONE]: TT650_Civ is Model to delete by default!"
 7:42:53 "Server_DeleteObj error: Improper parameter format"
 7:42:53 "[VEHICLE CLEANUP ZONE]: V3S_RA_TK_GUE_EP1_DZE (V3S Reammo) by Trader City Stary @062075 [6292.99,7806.43,0.000701904] [ID:350,UID:0] Cargo: [[[],[]],[[],[]],[[],[]]]"
 7:42:53 "[VEHICLE CLEANUP ZONE]: V3S_RA_TK_GUE_EP1_DZE Un-Locked"
 7:42:53 "Server_DeleteObj error: Improper parameter format"

Replace this line:

default{_msg = format["%2: %1",_typeOf,_txt];deleteVehicle _obj;[_objID,_objUID,_msg] call server_deleteObj;};

With this line:

default{_msg = format["%2: %1",_typeOf,_txt];deleteVehicle _obj;[_objID,_objUID,_msg] call server_deleteObjDirect;};

For what it's worth, this is a good script with a lot of features but it is very performance intensive since it scans every vehicle to see if it's in the safezone on server startup

Share this post


Link to post
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

  • Similar Content

    • By calinova22
      How would I go about adding custom vehicles to my server? I want to have an F35B with no weapons. I know how to remove the weapons, just cant find the file for the jet itself to edit.
    • By Irradiated Beef
      Howdy folks, sorry to ask what should be an obvious and easy thing, but my searches over the last two days haven't found me a current answer.
      Apparently in the older versions of Epoch, you would add vehicles by editing the allowedvehicleslist,  however that seems to have changed in later versions, as the list is no longer there. I found some documents that state it's in the mission.pbo, some that state it's in the epochconfig.hpp (there's a reference to it but no actual list), and some that state it should be somewhere else in the epoch_server_settings, but I've come up completely blank.
      Does anyone happen to know where this is in the current (Epoch 1.0) release? 
      Considering most documentation I'm finding is several years old, I can only assume I'm looking in the wrong places. :( 
    • By Dank Professor
      Connection Info: 199.60.101.242:2302
      Addons: @EPOCH
      Steam Group Page: http://steamcommunity.com/groups/ApricotCrew
      Discord: https://discord.gg/tHVsxqU
      Team Speak Server: 216.105.171.14:10158
      Web (under construction): http://apricotcrew.com/

      Group Description:  Apricot Crew—a gaming community built on mutual respect
      Are you tired of TS servers full of dictators, crazy rules, and painful disruptions to your gaming experience? Look no further, you finally found a place to call "home." Apricot Crew is a community of like minded gamers. If you respect us, we'll respect you.
      For the love of the game, have fun!
       
      P.S.  We started this server as a bunch of friends who wanted a dedicated place to play Epoch.  Come try it so we can have more people on at once...
    • By loki_bagel
      look man, its fun and all, but, its not fun when theres nobody on
      regular-ish airdrops with some pretty good stuff
      admins usually on 
      noob friendly
       
       
    • By Thug
      [SOLVED]
      All below has to do with a spawned in truck being used as a loot crate.
      this setHit [""wheel_2_3_steering"", 1];
      I know that the 2 points to the right side of the vehicle. 3 points to the middle tire.
      The 1, if let at 1 removes the tire. I'm i right so far?  If so, if I lower the 1 to  lets say  0.50 it will leave the tire on and have 50% damage?
  • Advertisement
  • Advertisement
  • Supporters
  • Advertisement
  • Discord

×