Jump to content
Brian Soanes

Unlock vehicles left in trader over restart

Recommended Posts

To unlock vehicles left in your traders over a server restart, open your epoch_server.pbo

In epoch_server\compile\epoch_vehicle\EPOCH_load_vehicles.sqf
Find

if (_allowDamage) then {

Just above that, add this

A3E_SafeZonePosArray =
[
	[[18451.9,14278.1,0]],   //Altis East trader
	[[13333.5,14494.3,0]],   //Altis Central trader
	[[6192.46,16834,0]]      //Altis West trader
];

{
	if (_vehicle distance (_x select 0) < 200) then
    {
        _vehicle lock false;
        diag_log format["Vehicle %1 left in trader unlocked @ %2", _class, mapGridPosition _vehicle];
    };
} forEach A3E_SafeZonePosArray;

Pack pbo and you're good to go

Share this post


Link to post
Share on other sites

I think we can also use this instead.

Quote

                        _restricted = nearestObjects [_vehicle, ["ProtectionZone_Invisible_F"], 200];
                        if !(_restricted isEqualTo []) then {
                            _vehicle lock false;
                            diag_log format["Vehicle %1 left in trader unlocked @ %2", _class, mapGridPosition _vehicle];
                        };

 

Share this post


Link to post
Share on other sites

Not all trader camps have protection zones or props...

Better way though for vanilla A3E users (rather than hard coding them) would be:

private _config = configFile >> "CfgEpoch";
private _configWorld = _config >> worldname;
private _A3E_SafeZonePosArray  = [];
{
    _A3E_SafeZonePosArray  pushback [_x select 3, 200];
} foreach (getArray(_configWorld >> "telePos"));

{
    if (_vehicle distance (_x select 0) < (_x select 1)) then
    {
        _vehicle lock false;
        diag_log format["Vehicle %1 left in trader unlocked @ %2", _class, mapGridPosition _vehicle];
    };
} forEach _A3E_SafeZonePosArray;

Then you get the locations from the map files in epoch_server_settings...

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 Vladick
      BSBS Server IP: 216.244.93.103:7802
      Website: https://bsbsepoch.000webhostapp.com/
      Discord: https://discord.gg/PVn8PvG
      Server Features:
      PvPvE Database wiped 1/5/18 ESS V3 spawn selection Coins and Global Banking WAI missions and Roaming DZAI Bandits Customized map additions Skalisky Bridge Skalisky Island Bandit Camp with high loot (fun mission!) Garage Door Opener Virtual Garage Deploy bike Refuel, Repair, Rearm Take clothes Bury Body Butcher Body Locate vehicle with keys and GPS One plot poll per player Indestructible bases Trader Safe Zones Day/Night Schedule 4-hour restarts
    • By vbawol
      Arma 3 Epoch 1.1 has been released!
      Server Files:
      https://github.com/EpochModTeam/Epoch/archive/1.1.0.1195.zip
      File Changes:
      https://github.com/EpochModTeam/Epoch/pull/969/files
      Client Files
      https://github.com/EpochModTeam/EpochCore/releases/download/1.1.0.1194/Epoch_Client_1.1.0.0.zip
      Changelog:
      Added
      Plant Spawner: vehicle object for sunflower. @Helion4 MoneyDrop Event: Random Money lump with Mapmarker (like Plants) @he-man Examples for Vehicle upgrades for Server Admins into CfgVehicleUpgrades.hpp @he-man Make Lighter refillable at Fuel-Sources (Gasstations / Vehicles) @he-man Make Trader more configurable in epochconfig.hpp @he-man Added Examples for Batchfiles to control Server Restarts @DirtySanchez default pops for "center" marker @awol More map supports @awol Lighter is needed to imflame fires @DirtySanchez FireExtinguisher is needed to "put our fire" on Burn Barrel @DirtySanchez Rope is needed for SlingLoad (get back on release) @DirtySanchez R3F compatibility for SlingLoad @DirtySanchez Hints while using Vehicle Repair (MultiGun) @he-man Config to completely disable Simulation for BaseParts (if not needed) @he-man Made Radiation configureable by cfgepochclient.hpp @raymix Hints for lock / unlock Vehicles / Storages @he-man Nuisance multiplicator in cfgepochclient.hpp @he-man Reduce rads over time at cost of immunity @raymix Wearable Male & Female wearable full radiation suit @Helion4 December seasonal items (Santa hat / Snowman) @Helion4 Autorun function (suggested by Ghostrider) @he-man Default Key is "W" You can change the key in EPOCH ESC Menu If choosen key is same as "moveforward" (default), you have to 2x tap it, else you only have to 1x tap it If your legs are broken, you get a hint "can not autorun - legs are broken" If the terrain is too steep, you only walk in AutoRun Inside Water, you can not Autorun Helper 3D-Icon + Line on the part, where element is snapped on (while Base-Building) @he-man Config in cfgepochclient.hpp to block ATM's in Plotpole range @he-man Power Sword @helion Fixed
      False BE kicks since Arma 3 1.80 update. Nightlight now also follow players inside Vehicles @he-man Fixed fault disabled DynamicDebris @morgoth0 SERVER_VARS (BaseSpawn) was not saved on revive @morgoth0 Without Advanced Vehicle Repair, Vehicle upgrade was not available @he-man Base Storages could be deleted if near Loot containers were auto-deleted @he-man Some Tarp Loot was spawned under the Floor @he-man Reworked wall check by getting out of Vehicles @he-man Garden Plot had no physical ground @Helion4 Some Vehicles were missing in EPOCH Admin Spawn Menu @he-man Changed
      RCon Port is now set to 2307 by default since changes in A3 1.78 prevent use of 2306. @awol SnapPoints for Building objects (especially full / half / quarter Floors) @he-man Some performance tweaks Inventory will be opened automatically, if "you found something" @awol EPOCH Events reworked (Markers will change if players near / event looted) @DirtySanchez Traders will no longer refill sold magazines @he-man Magazines will automatic be repacked in Trader First the trader offers full magazines If no full magazine is available, the Trader offer the last not full magazine Not full magazines are colored: Yellow (nearly full) -> Red (nearly empty) You also get a Tooltip, how much bullets left in magazine The prices are calculated by the left bullets in the magazine Increased snap-distance for Foundations (much easier to find snap positions) @he-man Reworked and added EPOCH Vehicle Classes @he-man Each upgrade increase Speed, Torque, Fuel, Terrainbehaviour, Load and Armor Hatchback >= lvl2 will no longer stuck in forests Added M900 forced without Backseats -> "C_Heli_Light_01_civil_2seat_EPOCH" Added M900 forced with Backseats -> "C_Heli_Light_01_civil_4seat_EPOCH" The Random M900 will also stay available -> "C_Heli_Light_01_civil_EPOCH" Added very low EPOCH variants of VTOL and Xi'an (eventually we have to change them with the next update a bit) Added Door-Animations to some Vehicles by GetIn / GetOut
    • By FG_Trap
      Made this in my free time awhile ago thought id make it public.
      Right Alt is the key to open the menu.
      Install instructions are inside the download.
      https://github.com/NWDZ-Trapxxgods/traps-menu
       
       
      here is a picture of the server menu
       
    • By lordacus
      so i have been making a server between trying to get my provider to update their mods section. after getting this don i found the server with epoch and infistar were conflicting each other such as: when joining i can use infistar but when i press f9 or i to enter my inventory or f10 for the mobile pad it then conflicts (i think) infistar and i can no longer use it. any ideas on how to stop this
       
    • By 2DayZ2Retirement
      -PROBLEM SOLVED-
       
      G'day, Survivors.
      I am having an issue on my server where vehicles which spawn randomly around the map repair themselves upon server restart.
      I use this config in my init.sqf which successfully spawns the vehicles in damaged and with low fuel...
      DynamicVehicleDamageLow = 75;
      DynamicVehicleDamageHigh = 100;
      DynamicVehicleFuelLow = 0;
      DynamicVehicleFuelHigh = 25;
      ...However upon each server restart the vehicles repair themselves (the fuel remains low however) and for the life of me I can't figure out why this is happening. 
      DayZ Version -DayZ Epoch 1.0.6.2
      Scripts Used -DZAI | -DZMS | -Right Click Actions (Suicide, Smoke Drugs, GPS Scan)
      AntiHack - InfiSTAR
      Server Host - GTXGaming
      My HiveEXT.log and arma2oaserver.RPT logs are not showing anything out of the ordinary.
      I'm not sure if it matter, but all Planes/Helicopters and Boats have been removed from the server via the dynamic_vehicle.sqf.
      In addition, all of the traders and trader cities being removed by removing the call for the CfgServerTrader.hpp in the description.ext.
      If there is any other info I can show to assist in fixing this problem please let me know, any help would be greatly appreciated.
      Cheers.
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...