i been trying to write a script that deletes vehicles in the trader zones in epoch when the server restarts.
originally i had the idea to teliport the vehicles to random locations on the map but that is beyond my skill level at the moment.
i put this in a .sqf, and add entry into the init.sqf and it runs ok but no vehicles are destroyed.
i have also tried deleting them rather than destroying them.
it works fine without the if (isServer) but executes every time a player joins!
originally i had the idea to teliport the vehicles to random locations on the map but that is beyond my skill level at the moment.
Code:
waitUntil {!isNil "dayz_animalCheck"};
sleep 10;
private["_VehicleList"];
if (isServer) then
{
_VehicleList = nearestObjects [[6311.915, 7775.5518],["AH6X_DZ","AN2_DZ","ArmoredSUV_PMC_DZE","ATV_CZ_EP1","ATV_US_EP1","C130J_US_EP1","car_hatchback","car_sedan","CH_47F_EP1_DZE","CSJ_GyroC","CSJ_GyroCover","CSJ_GyroP","datsun1_civil_1_open","datsun1_civil_2_covered","datsun1_civil_3_open","Fishing_Boat","GAZ_Vodnik_DZE","GAZ_Vodnik_MedEvac","GLT_M300_LT","GLT_M300_ST","GNT_C185","GNT_C185C","GNT_C185R","GNT_C185U","hilux1_civil_1_open","hilux1_civil_2_covered","hilux1_civil_3_open_EP1","HMMWV_Ambulance","HMMWV_Ambulance_CZ_DES_EP1","HMMWV_DES_EP1","HMMWV_DZ","HMMWV_M1035_DES_EP1","HMMWV_M1151_M2_CZ_DES_EP1_DZE","HMMWV_M998A2_SOV_DES_EP1_DZE","Ikarus","Ikarus_TK_CIV_EP1","JetSkiYanahui_Case_Blue","JetSkiYanahui_Case_Green","JetSkiYanahui_Case_Red","JetSkiYanahui_Case_Yellow","Kamaz","KamazRefuel_DZ","Lada1","Lada1_TK_CIV_EP1","Lada2","Lada2_TK_CIV_EP1","LadaLM","LandRover_CZ_EP1","LandRover_MG_TK_EP1_DZE","LandRover_Special_CZ_EP1_DZE","LandRover_TK_CIV_EP1","M1030_US_DES_EP1","MH6J_DZ","Mi17_Civilian_DZ","Mi17_DZE","MMT_Civ","MtvrRefuel_DES_EP1_DZ","MTVR_DES_EP1","MV22_DZ","Offroad_DSHKM_Gue_DZE","Old_bike_TK_INS_EP1","Old_moto_TK_Civ_EP1","PBX","Pickup_PK_GUE_DZE","Pickup_PK_INS_DZE","Pickup_PK_TK_GUE_EP1_DZE","RHIB","S1203_ambulance_EP1","S1203_TK_CIV_EP1","Skoda","SkodaBlue","SkodaGreen","SkodaRed","Smallboat_1","Smallboat_2","SUV_Blue","SUV_Camo","SUV_Charcoal","SUV_Green","SUV_Orange","SUV_Pink","SUV_Red","SUV_Silver","SUV_TK_CIV_EP1","SUV_White","SUV_Yellow","tractor","TT650_Civ","TT650_Ins","TT650_TK_CIV_EP1","UAZ_CDF","UAZ_INS","UAZ_MG_TK_EP1_DZE","UAZ_RU","UAZ_Unarmed_TK_CIV_EP1","UAZ_Unarmed_TK_EP1","UAZ_Unarmed_UN_EP1","UH1H_DZE","UH1Y_DZE","UH60M_EP1_DZE","UralRefuel_TK_EP1_DZ","Ural_CDF","Ural_TK_CIV_EP1","Ural_UN_EP1","V3S_Open_TK_CIV_EP1","V3S_Open_TK_EP1","V3S_Refuel_TK_GUE_EP1_DZ","VolhaLimo_TK_CIV_EP1","Volha_1_TK_CIV_EP1","Volha_2_TK_CIV_EP1","VWGolf","Zodiac"], 75];
VehCount = count _VehicleList;
i = 0;
for "i" from 0 to VehCount do
{
v = _VehicleList select i;
v setDamage 1;
};
};
titleText ["Deleted All Vehicles within 75 meters of Trader Zones!.", "PLAIN"];titleFadeOut 5;
diag_log ("ANTI-VEH INIT");
i put this in a .sqf, and add entry into the init.sqf and it runs ok but no vehicles are destroyed.
i have also tried deleting them rather than destroying them.
it works fine without the if (isServer) but executes every time a player joins!
Last edited: