mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-21 23:50:48 +03:00
Merge remote-tracking branch 'origin/master'
# Conflicts: # CHANGE LOG 1.0.6.1.txt
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
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_names set [count _temp_keys_names,_ownerKeyName];
|
||||
_temp_keys set [count _temp_keys,str(_ownerKeyId)];
|
||||
};
|
||||
} count (items player);
|
||||
|
||||
[_temp_keys,_temp_keys_names]
|
||||
@@ -119,10 +119,11 @@ if (_inVehicle) then {
|
||||
_temp_keys_names = _totalKeys select 1;
|
||||
_hasKey = _vehicleOwnerID in _temp_keys;
|
||||
_oldOwner = (_vehicleOwnerID == _uid);
|
||||
|
||||
_text = getText (configFile >> "CfgVehicles" >> (typeOf DZE_myVehicle) >> "displayName");
|
||||
if (locked DZE_myVehicle) then {
|
||||
if (_hasKey || _oldOwner) then {
|
||||
_unlock = DZE_myVehicle addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[DZE_myVehicle,(_temp_keys_names select (parseNumber _vehicleOwnerID))], 2, false, true];
|
||||
_unlock = DZE_myVehicle addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[DZE_myVehicle,(_temp_keys_names select (_temp_keys find _vehicleOwnerID))], 2, false, true];
|
||||
s_player_lockUnlockInside set [count s_player_lockUnlockInside,_unlock];
|
||||
s_player_lockUnlockInside_ctrl = 1;
|
||||
} else {
|
||||
@@ -691,7 +692,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
|
||||
_oldOwner = (_characterID == _uid);
|
||||
if (locked _cursorTarget) then {
|
||||
if (_hasKey || _oldOwner) then {
|
||||
_unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[_cursorTarget,(_temp_keys_names select (parseNumber _characterID))], 2, true, true];
|
||||
_unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[_cursorTarget,(_temp_keys_names select (_temp_keys find _characterID))], 2, true, true];
|
||||
s_player_lockunlock set [count s_player_lockunlock,_unlock];
|
||||
s_player_lockUnlock_crtl = 1;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user