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 Restplay
      Hello, does anyone have Sector C files for the Napf map? On the island where is the Sürenfeld Observatory.
    • By draco-nobilis
      Can anyone help with changing the trader scenery map items.
      I believe that the trader map items are set in  dayz_code/system/mission/"***whatever map***.sqf
      I have made changes to coordinates and item class name but when I check on server nothing has altered 
      I even deleted all but one item and still all was same 
      When i removed the init call for this file every thing vanished  this i think seems to suggest it is correct file
      i am a bit confused . I could  remove all and make complete new map additions with editor but would like to use existing method.
      I can add and moved the actual traders   but not their suroundings
    • By Restplay
      Hello i created my server from this thread:
       
    • By salival
      Remote Vehicle is part of Epoch 1.0.7.1 now.
       
      Hi,
      Here's a script I wrote that does the following from right clicking your key in your toolbelt:
      Unlock/lock vehicle. Turn engine on/off. Eject players not in your group. Thanks to @Pattohfor the idea for this script.
      For downloading and install instructions, see my github: https://github.com/oiad/remoteVehicle
    • By salival
      Zabns Take Clothes is part of Epoch 1.0.7.1 now.
      Hi,
      Since Zabn is MIA I have updated his Take Clothes script to 1.0.7 compatible.
      Github with install instructions and download location: https://github.com/oiad/TakeClothes
       
       
      **** For Epoch 1.0.6.2 only **** >> Download <<
      Visit this link: https://github.com/oiad/TakeClothes/tree/Epoch_1.0.6.2
      (original install url: http://opendayz.net/threads/release-zabns-take-clothes-2-0.19290/)
      (original discussion url: http://opendayz.net/threads/help-discussion-zabns-take-clothes.13198/)
       
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...