Jump to content

Delete vehicles parked in safezones on restart


Halvhjearne

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.

Link to comment
Share on other sites

  • 5 weeks later...

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;

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

Link to comment
Share on other sites

  • 1 year later...

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?

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

Link to comment
Share on other sites

  • 1 month later...
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

Link to comment
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.

Link to comment
Share on other sites

  • 3 months later...
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.

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

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

Link to comment
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";

 
Link to comment
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 {

Link to comment
Share on other sites

  • 1 month later...
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.

Link to comment
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.

Link to comment
Share on other sites

  • 7 months later...

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"

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

Link to comment
Share on other sites

  • 2 years later...

Hello,

so I installed this following the instructions on my 1.0.6.2 server and I get the following error in my console, z/addon/compile/server_deleteobj...... error not found 

 

and the path is correct and all checked it 15 times anyone know why? 
 

Ill try to upload my rpt tommorow

 

Thank 

Link to comment
Share on other sites

5 hours ago, VIPMISTER said:

Hello,

so I installed this following the instructions on my 1.0.6.2 server and I get the following error in my console, z/addon/compile/server_deleteobj...... error not found 

 

and the path is correct and all checked it 15 times anyone know why? 
 

Ill try to upload my rpt tommorow

 

Thank 

maybe you have to enter the correct path
[_object] execVM "\z\addons\dayz_server\compile\Server_DeleteObjInsafezone.sqf";
Link to comment
Share on other sites

@VIPMISTER Here's my version of a safezone relocate script for vehicles, it's significantly more optimized than this version you're trying to get working: https://github.com/oiad/safeZoneRelocate

 

This version in this thread is quite good, but it's very slow since it checks every vehicle to see if its in the safezone, my version checks every safezone for vehicles (much quicker)

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
×
×
  • Create New...