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