Вот весь кусок с включением:
Вот без изменений имён, не работает:
while { (true) } do { { if ((_x isKindOf "Man")) then { if ((alive _x) && !(_x getVariable ["dam_ignore_hit0",false]) && (("INJURED" == lifeState _x) or ("HEALTHY" == lifeState _x))) then { _units pushBack _x; _x setVariable ["dam_ignore_hit0",true]; IF (!isplayer _x) then { _jipId = { _ehId = _x addEventHandler ["HitPart", {(_this select 0) spawn PiRredirect;}]; _x setVariable ["hitPartEhId", _ehId]; } remoteExec ["call", 0, true]; } ELSE { _jipId0 = { _ehId = _x addEventHandler ["HitPart", {(_this select 0) spawn PiRredirect0;}]; _x setVariable ["hitPartEhId", _ehId]; } remoteExec ["call", 0, true]; }; }; }; } forEach allUnits; sleep 30; };
Вот с изменением, то же не работает:
while { (true) } do { { if ((_x isKindOf "Man")) then { if ((alive _x) && !(_x getVariable ["dam_ignore_hit0",false]) && (("INJURED" == lifeState _x) or ("HEALTHY" == lifeState _x))) then { _units pushBack _x; _x setVariable ["dam_ignore_hit0",true]; IF (!isplayer _x) then { PiRjipId = { PiRehId = _x addEventHandler ["HitPart", {(_this select 0) spawn PiRredirect;}]; _x setVariable ["hitPartEhId", PiRehId]; } remoteExec ["call", 0, true]; } ELSE { PiRjipId0 = { PiRehId0 = _x addEventHandler ["HitPart", {(_this select 0) spawn PiRredirect0;}]; _x setVariable ["hitPartEhId", PiRehId0]; } remoteExec ["call", 0, true]; }; }; }; } forEach allUnits; sleep 30; };