mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
respawn: raise "killedByFriendly" ACE event globally
This commit is contained in:
parent
e1b1edc961
commit
bce84d9a2d
@ -1,16 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Respawn_fnc_showFriendlyFireMessages
|
Name: ACE_Respawn_fnc_showFriendlyFireMessages
|
||||||
|
|
||||||
Author(s):
|
Author(s):
|
||||||
commy2
|
commy2
|
||||||
|
|
||||||
Description:
|
Description:
|
||||||
shows a message in system chat of who killed who
|
shows a message in system chat of who killed who
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
0: OBJECT - unit
|
0: OBJECT - unit
|
||||||
1: OBJECT - killer
|
1: OBJECT - killer
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
VOID
|
VOID
|
||||||
*/
|
*/
|
||||||
@ -25,5 +25,8 @@ _killer = _this select 1;
|
|||||||
if (_unit != _killer && side group _unit in [side group ACE_player, civilian] && {side group _killer == side group ACE_player}) then {
|
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] call EFUNC(common,getName), [_killer] call EFUNC(common,getName)];
|
systemChat format ["%1 was killed by %2", [_unit] call EFUNC(common,getName), [_killer] call EFUNC(common,getName)];
|
||||||
|
|
||||||
|
// Raise custom event. @todo: remove
|
||||||
[_unit, "killedByFriendly", [_unit, _killer]] call EFUNC(common,callCustomEventHandlers);
|
[_unit, "killedByFriendly", [_unit, _killer]] call EFUNC(common,callCustomEventHandlers);
|
||||||
|
// Raise ACE globalEvent
|
||||||
|
["killedByFriendly", [_unit, _killer]] call EFUNC(common,globalEvent);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user