mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
should fix invincibility
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
private ["_weapons","_CID","_backpackWpn","_backpackMag","_currentWpn","_isWeapon","_backpackWpnTypes","_backpackWpnQtys","_countr","_class","_position","_dir","_currentAnim","_playerUID","_countMags","_magazines","_primweapon","_secweapon","_newBackpackType","_muzzles","_oldUnit","_group","_newUnit","_oldGroup","_idc","_display","_switchUnit","_leader","_currentCamera"];
|
private ["_weapons","_isArray","_CID","_backpackWpn","_backpackMag","_currentWpn","_isWeapon","_backpackWpnTypes","_backpackWpnQtys","_countr","_class","_position","_dir","_currentAnim","_playerUID","_countMags","_magazines","_primweapon","_secweapon","_newBackpackType","_muzzles","_oldUnit","_group","_newUnit","_oldGroup","_idc","_display","_switchUnit","_leader","_currentCamera"];
|
||||||
|
_isArray = typeName _this == "ARRAY";
|
||||||
if (typeName _this == "ARRAY") then {
|
if (typeName _this == "ARRAY") then {
|
||||||
_class = _this select 0;
|
_class = _this select 0;
|
||||||
_CID = _this select 1;
|
_CID = _this select 1;
|
||||||
@@ -80,14 +81,15 @@ _leader = (player == leader _oldGroup);
|
|||||||
//[player] joinSilent grpNull;
|
//[player] joinSilent grpNull;
|
||||||
_group = createGroup west;
|
_group = createGroup west;
|
||||||
_newUnit = _group createUnit [_class,respawn_west_original,[],0,"NONE"];
|
_newUnit = _group createUnit [_class,respawn_west_original,[],0,"NONE"];
|
||||||
_newUnit allowDamage false;
|
if (_isArray) then {
|
||||||
mydamage_eh1 = _newUnit AddEventHandler ["HandleDamage", {False}];
|
_newUnit allowDamage false;
|
||||||
|
mydamage_eh1 = _newUnit AddEventHandler ["HandleDamage", {False}];
|
||||||
|
_newUnit setVariable ["characterID",_CID,true];
|
||||||
|
};
|
||||||
_newUnit setDir _dir;
|
_newUnit setDir _dir;
|
||||||
{_newUnit removeMagazine _x;} count magazines _newUnit;
|
{_newUnit removeMagazine _x;} count magazines _newUnit;
|
||||||
removeAllWeapons _newUnit;
|
removeAllWeapons _newUnit;
|
||||||
|
|
||||||
if (!isnil "_CID") then {_newUnit setVariable ["characterID",_CID,true];};
|
|
||||||
|
|
||||||
//Equip New Character
|
//Equip New Character
|
||||||
{
|
{
|
||||||
if (typeName _x == "ARRAY") then {if (count _x > 0) then {_newUnit addMagazine [_x select 0,_x select 1]; }; } else { _newUnit addMagazine _x; };
|
if (typeName _x == "ARRAY") then {if (count _x > 0) then {_newUnit addMagazine [_x select 0,_x select 1]; }; } else { _newUnit addMagazine _x; };
|
||||||
|
|||||||
Reference in New Issue
Block a user