mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
Direct menu to cursortarget or player
Please test the living hell out of this.
This commit is contained in:
@@ -8,6 +8,7 @@ if ((vehicle player) == player) then {
|
|||||||
_dis = if (_cTarget isKindOf "USEC_ch53_E" || _cTarget isKindOf "MV22") then {25} else {12};
|
_dis = if (_cTarget isKindOf "USEC_ch53_E" || _cTarget isKindOf "MV22") then {25} else {12};
|
||||||
_exit = false;
|
_exit = false;
|
||||||
|
|
||||||
|
if (!DZE_GearCheckBypass) then {
|
||||||
if (locked _cTarget && {(_cTarget isKindOf "LandVehicle") or {_cTarget isKindOf "Air"} or {_cTarget isKindOf "Ship"}} && {(player distance _cTarget) <= _dis}) then {
|
if (locked _cTarget && {(_cTarget isKindOf "LandVehicle") or {_cTarget isKindOf "Air"} or {_cTarget isKindOf "Ship"}} && {(player distance _cTarget) <= _dis}) then {
|
||||||
_exit = true;
|
_exit = true;
|
||||||
} else {
|
} else {
|
||||||
@@ -27,12 +28,6 @@ if ((vehicle player) == player) then {
|
|||||||
} forEach _nearestObjects;
|
} forEach _nearestObjects;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_exit) then {
|
|
||||||
localize "str_epoch_player_7" call dayz_rollingMessages;
|
|
||||||
_display closeDisplay 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (DZE_BackpackAntiTheft) then {
|
if (DZE_BackpackAntiTheft) then {
|
||||||
_friendlies = player getVariable ["friendlies",[]];
|
_friendlies = player getVariable ["friendlies",[]];
|
||||||
_rID = if (DZE_permanentPlot) then { getPlayerUID _cTarget } else { _cTarget getVariable ["CharacterID","0"] };
|
_rID = if (DZE_permanentPlot) then { getPlayerUID _cTarget } else { _cTarget getVariable ["CharacterID","0"] };
|
||||||
@@ -41,4 +36,25 @@ if ((vehicle player) == player) then {
|
|||||||
_display closeDisplay 1;
|
_display closeDisplay 1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_exit) then {
|
||||||
|
_lastSave = dayz_lastSave;
|
||||||
|
_startTime = diag_tickTime;
|
||||||
|
localize "str_epoch_player_7" call dayz_rollingMessages;
|
||||||
|
_display closeDisplay 1;
|
||||||
|
_ctType = typeOf _cTarget;
|
||||||
|
//direct gear to cursorTarget
|
||||||
|
[_lastSave, _startTime, _ctType, _cTarget] spawn {
|
||||||
|
waitUntil {((_this select 0) != dayz_lastSave) || {diag_tickTime >= ((_this select 1) + 1)}}; //waiting is required otherwise player_forceSave will reset DZE_GearCheckBypass
|
||||||
|
DZE_GearCheckBypass = true;
|
||||||
|
if ((((_this select 2) in DZE_isNewStorage) || {(_this select 2) == "LockboxStorage"} || {(_this select 2) isKindOf "Land_A_tent"} || {(_this select 2) isKindOf "WeaponHolder"} || {((!alive (_this select 3)) && {(_this select 2) isKindOf "Man"})}) && {!(locked (_this select 3))}) then {
|
||||||
|
Player action ["GEAR", (_this select 3)];
|
||||||
|
} else {
|
||||||
|
createGearDialog [player, "RscDisplayGear"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
DZE_GearCheckBypass = false; //exit will always be false the when the above code opens a new gear menu, this will reset the variable
|
||||||
|
};
|
||||||
};
|
};
|
||||||
@@ -544,6 +544,7 @@ DZE_tradeObject = DZE_tradeVehicle + ["trade_backpacks"];
|
|||||||
if (isNil "DZE_plotOwnershipExclusions") then {
|
if (isNil "DZE_plotOwnershipExclusions") then {
|
||||||
DZE_plotTakeOwnershipItems = DayZ_SafeObjects - (DZE_LockableStorage + ["Plastic_Pole_EP1_DZ","DZ_storage_base"]);
|
DZE_plotTakeOwnershipItems = DayZ_SafeObjects - (DZE_LockableStorage + ["Plastic_Pole_EP1_DZ","DZ_storage_base"]);
|
||||||
};
|
};
|
||||||
|
DZE_GearCheckBypass = false;
|
||||||
isInTraderCity = false;
|
isInTraderCity = false;
|
||||||
inTraderCity = "Unknown Trader";
|
inTraderCity = "Unknown Trader";
|
||||||
PlayerDeaths = [];
|
PlayerDeaths = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user