mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
gear access on surrendered player test
This commit is contained in:
@@ -22,6 +22,8 @@ if (_dikCode in actionKeys "Surrender") then {
|
|||||||
[objNull, player, rSwitchMove,""] call RE;
|
[objNull, player, rSwitchMove,""] call RE;
|
||||||
player playActionNow "";
|
player playActionNow "";
|
||||||
|
|
||||||
|
player setVariable ["DZE_Surrendered", false, true];
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
DZE_Surrender = true;
|
DZE_Surrender = true;
|
||||||
|
|
||||||
@@ -32,7 +34,9 @@ if (_dikCode in actionKeys "Surrender") then {
|
|||||||
if (secondaryWeapon player != "") then {
|
if (secondaryWeapon player != "") then {
|
||||||
player action ["dropWeapon",player, (secondaryWeapon player)];
|
player action ["dropWeapon",player, (secondaryWeapon player)];
|
||||||
};
|
};
|
||||||
{player action ["dropMagazine", player, _x]} forEach magazines player;
|
|
||||||
|
// set publicvariable that allows other player to access gear
|
||||||
|
player setVariable ["DZE_Surrendered", true, true];
|
||||||
|
|
||||||
// surrender animation
|
// surrender animation
|
||||||
player playMove "AmovPercMstpSsurWnonDnon";
|
player playMove "AmovPercMstpSsurWnonDnon";
|
||||||
|
|||||||
@@ -270,6 +270,8 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If(DZE_AllowCargoCheck) then {
|
If(DZE_AllowCargoCheck) then {
|
||||||
if((_isVehicle or _isTent or _isnewstorage) and _isAlive and !_isMan and !locked _cursorTarget) then {
|
if((_isVehicle or _isTent or _isnewstorage) and _isAlive and !_isMan and !locked _cursorTarget) then {
|
||||||
if (s_player_checkGear < 0) then {
|
if (s_player_checkGear < 0) then {
|
||||||
@@ -321,6 +323,21 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
|||||||
if (_isMan and !_isZombie and !_isAnimal) then {
|
if (_isMan and !_isZombie and !_isAnimal) then {
|
||||||
_player_studybody = true;
|
_player_studybody = true;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// unit alive
|
||||||
|
|
||||||
|
// gear access on surrendered player
|
||||||
|
if(_isMan and !_isZombie and !_isAnimal) then {
|
||||||
|
if (_cursorTarget getVariable ["DZE_Surrendered",false]) then {
|
||||||
|
if (s_player_SurrenderedGear < 0) then {
|
||||||
|
//s_player_SurrenderedGear = player addAction [format[localize "str_actions_save",_text], "\z\addons\dayz_code\actions\forcesave.sqf",_cursorTarget, 1, true, true, "", ""];
|
||||||
|
s_player_SurrenderedGear = player addAction ["Gear",_text], (player action ["Gear", _cursorTarget]),_cursorTarget, 1, true, true, "", ""];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
player removeAction s_player_SurrenderedGear;
|
||||||
|
s_player_SurrenderedGear = -1;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user