Allow players to carry primary weapon on back

Configurable by DZE_TwoPrimaries

0 do not allow primary weapon on back.
1 allow primary weapon on back, but not when holding a primary weapon in
hand.
2 (default) allow player to hold two primary weapons, one on back and
one in their hands
This commit is contained in:
icomrade
2016-04-26 14:05:37 -04:00
parent c1eb07d99d
commit 16c81e7ce2
5 changed files with 17 additions and 24 deletions

View File

@@ -432,7 +432,7 @@ while {1 == 1} do {
};
//Two primary guns pickup exploit fix
if ((primaryWeapon player != "") && (!(primaryWeapon player in MeleeWeapons)) && (dayz_onBack != "") && (!(dayz_onBack in MeleeWeapons)) && (isNull (findDisplay 106)) &&
if ((DZE_TwoPrimaries < 2) && (primaryWeapon player != "") && (!(primaryWeapon player in MeleeWeapons)) && (dayz_onBack != "") && (!(dayz_onBack in MeleeWeapons)) && (isNull (findDisplay 106)) &&
(animationState player != "amovpknlmstpslowwrfldnon_amovpknlmstpsraswrfldnon" OR animationState player != "amovpercmstpslowwrfldnon_amovpercmstpsraswrfldnon" OR animationState player != "amovpercmstpslowwrfldnon_amovpercmstpsraswrfldnon")) then {
localize "str_player_ammo_2primary" call dayz_rollingMessages;
player playActionNow "stop";