2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-12 10:24:58 +00:00
|
|
|
/*
|
2015-09-26 14:26:41 +00:00
|
|
|
* Author: commy2
|
|
|
|
* Shows a message in system chat of who killed whom.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unitn <OBJECT>
|
|
|
|
* 1: Killer <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2020-04-25 06:41:45 +00:00
|
|
|
* [ACE_Player, killer] call ace_respawn_fnc_showFriendlyFireMessage
|
2015-09-26 14:26:41 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-01-12 09:07:03 +00:00
|
|
|
|
2015-09-26 14:26:41 +00:00
|
|
|
params ["_unit", "_killer"];
|
2015-01-12 09:07:03 +00:00
|
|
|
|
2015-09-26 14:26:41 +00:00
|
|
|
if (_unit != _killer && {side group _unit in [side group ACE_player, civilian]} && {side group _killer == side group ACE_player}) then {
|
2015-12-11 18:01:50 +00:00
|
|
|
systemChat format ["%1 was killed by %2", [_unit, false, true] call EFUNC(common,getName), [_killer, false, true] call EFUNC(common,getName)];
|
2015-01-12 09:07:03 +00:00
|
|
|
|
2015-01-16 15:38:43 +00:00
|
|
|
// Raise ACE globalEvent
|
2016-05-24 13:13:11 +00:00
|
|
|
["ace_killedByFriendly", [_unit, _killer]] call CBA_fnc_globalEvent;
|
2015-01-12 09:07:03 +00:00
|
|
|
};
|