mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
26 lines
545 B
Plaintext
26 lines
545 B
Plaintext
/*
|
|
* Author: commy2
|
|
*
|
|
* Mutes the unit. It won't trigger auto generated chat messages either.
|
|
*
|
|
* Argument:
|
|
* 0: Unit (Object)
|
|
*
|
|
* Return value:
|
|
* Nothing
|
|
*/
|
|
#include "\z\ace\addons\common\script_component.hpp"
|
|
|
|
private ["_unit", "_speaker"];
|
|
|
|
_unit = _this select 0;
|
|
|
|
if (isNull _unit) exitWith {};
|
|
|
|
_speaker = speaker _unit;
|
|
if (_speaker == "ACE_NoVoice") exitWith {};
|
|
|
|
[0, "{(_this select 1) setSpeaker 'ACE_NoVoice'}", _unit, "ACE_Speaker"] call FUNC(execPersistentFnc);
|
|
|
|
_unit setVariable ["ACE_OriginalSpeaker", _speaker, true];
|