Files
DayZ-Epoch/dayz_code/compile/object_setFixServer.sqf
Aaron Clark 76e9a0582e 0.1
2012-11-04 20:28:50 -06:00

23 lines
601 B
Plaintext

private["_unit","_selection","_strH","_dam","_total"];
_unit = _this select 0;
_selection = _this select 1;
_damage = _this select 2;
if (_selection != "" and local _unit) then {
_strH = "hit_" + (_selection);
_unit setHit[_selection,_damage];
//player sidechat str _damage;
_unit setVariable [_strH,_damage,true];
if (_damage == 0) then {
dayzUpdateVehicle = [_unit,"repair"];
} else {
dayzUpdateVehicle = [_unit,"damage"];
};
if (isServer) then {
if (allowConnection) then {
dayzUpdateVehicle call server_updateObject;
};
} else {
publicVariable "dayzUpdateVehicle";
};
};