mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
surrendered action v2
This commit is contained in:
@@ -16,17 +16,18 @@ increase. @Armifer
|
||||
* [FIXED] Reduced zombie attack ranges back to normal levels since it is no longer needed due to removal of vilas vehicles. @vbawol
|
||||
* [FIXED] Small typo in Axeman's tower light code was preventing it from working. @Torndeco
|
||||
* [FIXED] Case sensitivity issues with last versions SQL update calls.
|
||||
* [ADDED] Surrender action now drops your weapons and ammo then you put your hands on your head. While surrendered other players can access your gear.
|
||||
* [ADDED] Surrender action now drops your weapons and places your hands on your head. While surrendered other players can access your gear.
|
||||
* [ADDED] Remove nearest tanktrap with right click option on toolbox @dayz10k
|
||||
* [ADDED] Faster in string function by Killzone Kid http://killzonekid.com/arma-scripting-tutorials-how-to-find-a-string-within-a-string/
|
||||
* [ADDED] Halo jump option from a helicopter when above 500m. @zabn
|
||||
* [ADDED] Halo jump option from a helicopter when above 400m. @zabn
|
||||
* [ADDED] Localization support added. @zabn
|
||||
* [ADDED] Added/corrected dutch language and some typo's @JoSchaap
|
||||
* [ADDED] Added/corrected dutch language and fixed some typo's. @JoSchaap
|
||||
* [ADDED] Added 7 more male skins from Arma http://i.imgur.com/1b0n2Jy.png @axles @vbawol
|
||||
* [ADDED] Added 8 more Trucks from Arma: V3S_Civ, V3S_TK_EP1_DZE, V3S_RA_TK_GUE_EP1_DZE, UralCivil_DZE, UralCivil2_DZE, KamazOpen_DZE, MtvrRefuel_DZ, MTVR @vbawol
|
||||
* [ADDED] Destroy tent option when you have a full jerry can and matches. @vbawol
|
||||
* [ADDED] Tag friendly system now stores your 5 most recent friends with your life. Building on another friends plot and you are already tagged you still need to look at the owner once to complete the handshake so that you can start building. Server admins can disable this with DZE_FriendlySaving = false; in the init.sqf @zabn @vbawol
|
||||
* [ADDED] Player can now get crushed if they get out to close to a wall or building. Successful wall glitches now result in death ONLY if your get out position intersects a building. @vbawol
|
||||
* [CHANGED] Increased armor levels on wooded modular base building objects by 300%.
|
||||
* [CHANGED] Removed 12m restriction of other players when buying and selling vehicles. Added requirement that you must be the last to get in the drivers seat to sell the vehicle.
|
||||
* [CHANGED] Opening supply crate now returns a empty supply crate. @dayz10k
|
||||
* [CHANGED] Updated Makarov, MakarovSD, and M1911 damage settings to the same as DayZ CE 1.8. @vbawol
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_dikCode","_handled","_primaryWeapon","_secondaryWeapon","_nearbyObjects","_nill","_shift","_ctrl","_alt"];
|
||||
private ["_dikCode","_handled","_primaryWeapon","_secondaryWeapon","_nearbyObjects","_nill","_shift","_ctrl","_alt","_dropPrimary","_dropSecondary","_iItem","_removed","_iPos","_radius","_item"];
|
||||
_dikCode = _this select 1;
|
||||
|
||||
_handled = false;
|
||||
@@ -14,37 +14,56 @@ if ((_dikCode == 0x3E or _dikCode == 0x0F or _dikCode == 0xD3) and (diag_tickTim
|
||||
|
||||
// surrender
|
||||
if (_dikCode in actionKeys "Surrender") then {
|
||||
if (!DZE_Surrender) then {
|
||||
if (!DZE_Surrender and !(player isKindOf "PZombie_VB")) then {
|
||||
DZE_Surrender = true;
|
||||
// remove weaponns and ammo
|
||||
_dropPrimary = false;
|
||||
_dropSecondary = false;
|
||||
|
||||
_primaryWeapon = primaryWeapon player;
|
||||
_secondaryWeapon = secondaryWeapon player;
|
||||
if (_primaryWeapon != "") then {
|
||||
player action ["dropWeapon",player, _primaryWeapon];
|
||||
};
|
||||
if (_secondaryWeapon != "") then {
|
||||
player action ["dropWeapon",player, _secondaryWeapon];
|
||||
if (_primaryWeapon != "") then {_dropPrimary = true;};
|
||||
_secondaryWeapon = "";
|
||||
{
|
||||
if ((getNumber (configFile >> "CfgWeapons" >> _x >> "Type")) == 2) exitWith {
|
||||
_secondaryWeapon = _x;
|
||||
};
|
||||
} forEach (weapons player);
|
||||
if (_secondaryWeapon != "") then {_dropSecondary = true;};
|
||||
|
||||
if (_dropPrimary or _dropSecondary) then {
|
||||
player playActionNow "PutDown";
|
||||
_iPos = getPosATL player;
|
||||
_radius = 1;
|
||||
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
||||
_item setposATL _iPos;
|
||||
if (_dropPrimary) then {
|
||||
_iItem = _primaryWeapon;
|
||||
_removed = ([player,_iItem,1] call BIS_fnc_invRemove);
|
||||
if (_removed == 1) then {
|
||||
_item addWeaponCargoGlobal [_iItem,1];
|
||||
};
|
||||
};
|
||||
if (_dropSecondary) then {
|
||||
_iItem = _secondaryWeapon;
|
||||
_removed = ([player,_iItem,1] call BIS_fnc_invRemove);
|
||||
if (_removed == 1) then {
|
||||
_item addWeaponCargoGlobal [_iItem,1];
|
||||
};
|
||||
};
|
||||
player reveal _item;
|
||||
};
|
||||
|
||||
// set publicvariable that allows other player to access gear
|
||||
player setVariable ["DZE_Surrendered", true, true];
|
||||
// surrender animation
|
||||
player playMove "AmovPercMstpSsurWnonDnon";
|
||||
|
||||
diag_log format["DZE_Surrender: %1", DZE_Surrender];
|
||||
};
|
||||
_handled = true;
|
||||
};
|
||||
|
||||
if (_dikCode in actionKeys "MoveForward") then {r_interrupt = true};
|
||||
if (_dikCode in actionKeys "MoveLeft") then {r_interrupt = true};
|
||||
if (_dikCode in actionKeys "MoveRight") then {r_interrupt = true};
|
||||
if (_dikCode in actionKeys "MoveBack") then {r_interrupt = true};
|
||||
|
||||
if (DZE_Surrender and r_interrupt) then {
|
||||
player setVariable ["DZE_Surrendered", false, true];
|
||||
DZE_Surrender = false;
|
||||
diag_log format["DZE_Surrender2: %1", DZE_Surrender];
|
||||
};
|
||||
if (_dikCode in actionKeys "MoveForward") exitWith {r_interrupt = true; if (DZE_Surrender) then {call dze_surrender_off};};
|
||||
if (_dikCode in actionKeys "MoveLeft") exitWith {r_interrupt = true; if (DZE_Surrender) then {call dze_surrender_off};};
|
||||
if (_dikCode in actionKeys "MoveRight") exitWith {r_interrupt = true; if (DZE_Surrender) then {call dze_surrender_off};};
|
||||
if (_dikCode in actionKeys "MoveBack") exitWith {r_interrupt = true; if (DZE_Surrender) then {call dze_surrender_off};};
|
||||
|
||||
//Prevent exploit of drag body
|
||||
if ((_dikCode in actionKeys "Prone") and r_drag_sqf) exitWith { force_dropBody = true; };
|
||||
|
||||
@@ -317,6 +317,10 @@ if (!isDedicated) then {
|
||||
};
|
||||
};
|
||||
|
||||
dze_surrender_off = {
|
||||
player setVariable ["DZE_Surrendered", false, true];
|
||||
DZE_Surrender = false;
|
||||
};
|
||||
|
||||
gear_ui_init = {
|
||||
private["_control","_parent","_menu","_dspl","_grpPos"];
|
||||
|
||||
Reference in New Issue
Block a user