Add lock and unlock vehicle from inside

See: #1103
Made vehicle gear always accessible from inside.

Also added optional variable to prevent stealing from backpacks by
non-friendlies at traders.  Thanks to @maca134 for the method.
This commit is contained in:
ebaydayz
2016-02-24 20:56:13 -05:00
parent ff4a227a1d
commit 03353b9483
9 changed files with 109 additions and 35 deletions

View File

@@ -163,6 +163,23 @@ if (!isDedicated) then {
dayz_hunger = dayz_hunger + (_this select 0);
dayz_thirst = dayz_thirst + (_this select 1);
};
epoch_tempKeys = {
private ["_temp_keys","_temp_keys_names","_key_colors","_ownerKeyId","_ownerKeyName"];
_temp_keys = [];
_temp_keys_names = [];
// find available keys
_key_colors = ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"];
{
if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _x)) in _key_colors) then {
_ownerKeyId = getNumber(configFile >> "CfgWeapons" >> _x >> "keyid");
_ownerKeyName = getText(configFile >> "CfgWeapons" >> _x >> "displayName");
_temp_keys_names set [_ownerKeyId,_ownerKeyName];
_temp_keys set [count _temp_keys,str(_ownerKeyId)];
};
} count (items player);
[_temp_keys,_temp_keys_names]
};
epoch_totalCurrency = {
// total currency

View File

@@ -258,6 +258,7 @@ dayz_resetSelfActions = {
s_player_heli_lift = -1;
s_player_heli_detach = -1;
s_player_lockUnlock_crtl = -1;
s_player_lockUnlockInside_ctrl = -1;
s_player_toggleSnap = -1;
s_player_toggleSnapSelect = -1;
s_player_toggleSnapSelectPoint=[];
@@ -269,6 +270,7 @@ call dayz_resetSelfActions;
s_player_lastTarget = [objNull,objNull,objNull,objNull,objNull];
s_player_repairActions = [];
s_player_lockunlock = [];
s_player_lockUnlockInside = [];
// Custom
s_player_madsci = [];
@@ -564,6 +566,9 @@ if (isNil "DZE_checkNearbyRadius") then {
if (isNil "DZE_RestrictSkins") then {
DZE_RestrictSkins = [];
};
if (isNil "DZE_BackpackAntiTheft") then {
DZE_BackpackAntiTheft = false;
};
// needed on server
if(isNil "DZE_PlotPole") then {
DZE_PlotPole = [30,45];