arma2-epoch-server/@DayZ_Epoch_Server/addons/dayz_server/compile/server_setHitpoints.sqf

9 lines
295 B
Plaintext
Raw Normal View History

2023-10-01 20:58:19 +03:00
local _obj = _this select 0;
local _hitpoints = _this select 1;
local _isAir = _obj isKindOf "Air";
{
local _selection = _x select 0;
local _dam = [_x select 1,(_x select 1) min 0.8] select (!_isAir && {_selection in dayZ_explosiveParts});
_obj setHit [_selection,_dam];
} count _hitpoints;