mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user