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 {
|
2015-04-06 16:22:43 +00:00
|
|
|
if (!local _reciever) then {
|
2015-09-19 18:17:38 +00:00
|
|
|
[_this, QFUNC(sendDisplayMessageTo), _reciever, false] call FUNC(execRemoteFnc);
|
2015-04-06 16:22:43 +00:00
|
|
|
} else {
|
|
|
|
if (isLocalized _title) then {
|
|
|
|
_title = localize _title;
|
|
|
|
};
|
2015-09-19 18:17:38 +00:00
|
|
|
|
2015-04-06 16:22:43 +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";
|
2015-04-06 16:22:43 +00:00
|
|
|
_localizationArray = [_title];
|
2015-09-19 18:17:38 +00:00
|
|
|
|
2015-04-06 16:22:43 +00:00
|
|
|
{
|
2015-09-19 18:17:38 +00:00
|
|
|
_localizationArray pushBack _x;
|
|
|
|
false
|
|
|
|
} count _parameters;
|
|
|
|
|
2015-04-06 16:22:43 +00:00
|
|
|
_title = format _localizationArray;
|
2015-01-16 23:21:47 +00:00
|
|
|
|
2015-04-06 16:22:43 +00:00
|
|
|
_localizationArray = [_content];
|
2015-09-19 18:17:38 +00:00
|
|
|
|
2015-04-06 16:22:43 +00:00
|
|
|
{
|
2015-09-19 18:17:38 +00:00
|
|
|
_localizationArray pushBack _x;
|
|
|
|
false
|
|
|
|
} count _parameters;
|
|
|
|
|
2015-04-06 16:22:43 +00:00
|
|
|
_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-04-06 16:22:43 +00:00
|
|
|
};
|
2015-09-19 18:17:38 +00:00
|
|
|
};
|