ACE3/addons/common/functions/fnc_sendDisplayMessageTo.sqf

54 lines
1.2 KiB
Plaintext
Raw Normal View History

2015-09-19 18:17:38 +00:00
/*
* Author: Glowbal
* Displays a message on locality of receiver
2015-01-16 23:21:47 +00:00
*
2015-09-19 18:17:38 +00:00
* Arguments:
* 0: receiver <OBJECT>
* 1: title <STRING>
* 2: content <ARRAY>
* 3: type (optional) <NUMBER>
*
* Return Value:
* None
*
* Public: Yes
2015-01-16 23:21:47 +00:00
*/
#include "script_component.hpp"
2015-09-19 18:17:38 +00:00
params [["_reciever", objNull], ["_title", ""], ["_content", ""], ["_type", 0], ["_parameters", []]];
2015-01-16 23:21:47 +00:00
if (isPlayer _reciever) then {
if (!local _reciever) then {
2015-09-19 18:17:38 +00:00
[_this, QFUNC(sendDisplayMessageTo), _reciever, false] call FUNC(execRemoteFnc);
} else {
if (isLocalized _title) then {
_title = localize _title;
};
2015-09-19 18:17:38 +00:00
if (isLocalized _content) then {
_content = localize _content;
};
2015-01-16 23:21:47 +00:00
2015-09-19 18:17:38 +00:00
private "_localizationArray";
_localizationArray = [_title];
2015-09-19 18:17:38 +00:00
{
2015-09-19 18:17:38 +00:00
_localizationArray pushBack _x;
false
} count _parameters;
_title = format _localizationArray;
2015-01-16 23:21:47 +00:00
_localizationArray = [_content];
2015-09-19 18:17:38 +00:00
{
2015-09-19 18:17:38 +00:00
_localizationArray pushBack _x;
false
} count _parameters;
_content = format _localizationArray;
2015-01-16 23:21:47 +00:00
2015-09-19 18:17:38 +00:00
[_title, _content, _type] call FUNC(displayMessage);
};
2015-09-19 18:17:38 +00:00
};