Update EPOCH_server_save_killedBuilding.sqf

Check if building killer is the owner and log accordingly
This commit is contained in:
MGT 2018-06-24 14:26:55 +01:00 committed by GitHub
parent 8de2f07525
commit 330017686e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,6 +35,14 @@ if (!isNull _building) then {
publicvariable "EPOCH_BaseCams";
};
['BuildingKilled', format["%1 was killed by %2 at %3", typeOf _building, _killer, getPosATL _building]] call EPOCH_fnc_server_hiveLog;
// Check if building killer is the owner and log accordingly
if ((_building getVariable["BUILD_OWNER", "-1"]) in [getPlayerUID _killer, _killer getVariable["GROUP", ""]]) then
{
['BuildingRemoved', format["%1 was removed by %2 (owner) at %3", typeOf _building, _killer, getPosATL _building]] call EPOCH_fnc_server_hiveLog;
}
else
{
['BuildingKilled', format["%1 was killed by %2 at %3", typeOf _building, _killer, getPosATL _building]] call EPOCH_fnc_server_hiveLog;
};
};
};