mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
108ff4f644
Regex used: \[(.+?),(.+?),(.+?)\]\s+call\s+E?FUNC\((common,)?(target|object)Event\) [$1,$3,$2] call CBA_fnc_targetEvent E?FUNC\((common,)?(server|global|local)Event\) CBA_fnc_$2Event E?FUNC\((common,)?(add|remove)EventHandler\) CBA_fnc_$2EventHandler
27 lines
705 B
Plaintext
27 lines
705 B
Plaintext
/*
|
|
* Author: commy2
|
|
* Shows a message in system chat of who killed whom.
|
|
*
|
|
* Arguments:
|
|
* 0: Unitn <OBJECT>
|
|
* 1: Killer <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [ACE_Player, killer] call ace_module_fnc_functionName
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_unit", "_killer"];
|
|
|
|
if (_unit != _killer && {side group _unit in [side group ACE_player, civilian]} && {side group _killer == side group ACE_player}) then {
|
|
systemChat format ["%1 was killed by %2", [_unit, false, true] call EFUNC(common,getName), [_killer, false, true] call EFUNC(common,getName)];
|
|
|
|
// Raise ACE globalEvent
|
|
["killedByFriendly", [_unit, _killer]] call CBA_fnc_globalEvent;
|
|
};
|