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 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.
    • By vbawol
      Open world survival mod set just two years after the mass extinction of billions of people. Those that remain are left with remnants of a once technological society. Try to survive, build, or explore your way through the harsh dynamic environment.
      Features
      Powerful persistence framework for Arma 3 with native Windows and Linux dedicated server support. Fully configurable script based security checks. Base Building re-envisioned for Arma 3 PhysX. Persistent secure and insecure storage devices. Upgradeable locking doors. Barter based economy and trading systems backed a single currency ¤ called "Krypto". Hostile Environment with several different types of antagonists, Air and Water temperature extremes, and Earthquakes. Hunting, Fishing, Tame Dogs, Explore & Loot: Wrecked ships, Abandoned vehicles and buildings, Perform task based missions and more! Open source APL-SA Epoch Survival MP gamemode. Open source APL-SA Modders resource configs and Class List. Assets can be used as a mod dependency on Steam workshop.
    • By Achef
      Greetings!
      So I recently started up in a new host and haven't gotten to make the server run, found that a ca/modules bis_fnc issue is recurring but doesn't affect players when running coop missions like the default arma 2 oa ones, but when trying with Epoch hive won't connect/start despite being configured.
      Hive error
      Meanwhile at line 23...
       
      I'm still bad with Pastebin, sorry.
       
      This error has been chasing me for 2 days now
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...