2015-08-28 21:52:56 +00:00
|
|
|
/*
|
2015-09-05 03:40:00 +00:00
|
|
|
DMS_fnc_BroadcastMissionStatus
|
2015-08-28 21:52:56 +00:00
|
|
|
Created by eraser1
|
|
|
|
|
|
|
|
Usage:
|
2015-09-05 03:40:00 +00:00
|
|
|
_message call DMS_fnc_BroadcastMissionStatus;
|
2015-08-28 21:52:56 +00:00
|
|
|
|
|
|
|
Requires "DMS_PlayerNotificationTypes".
|
|
|
|
|
|
|
|
Notification type "dynamicTextRequest" requires "DMS_dynamicText_Size" and "DMS_dynamicText_Color".
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2015-10-04 03:32:42 +00:00
|
|
|
private ["_missionName", "_messageInfo", "_titleColor", "_message"];
|
|
|
|
|
|
|
|
_OK = params
|
|
|
|
[
|
|
|
|
["_missionName","",[""]],
|
|
|
|
["_messageInfo",[],[[]],[2]]
|
|
|
|
];
|
|
|
|
|
|
|
|
if (!_OK) exitWith
|
|
|
|
{
|
|
|
|
diag_log format ["DMS ERROR :: Calling DMS_fnc_BroadcastMissionStatus with invalid parameters: %1",_this];
|
|
|
|
};
|
|
|
|
|
|
|
|
_messageInfo params
|
|
|
|
[
|
|
|
|
["_titleColor","#FFFF00",[""]],
|
|
|
|
["_message","",[""]]
|
|
|
|
];
|
|
|
|
|
2015-08-27 07:44:23 +00:00
|
|
|
if (DMS_DEBUG) then
|
|
|
|
{
|
2015-10-04 03:32:42 +00:00
|
|
|
diag_log format["DMS_DEBUG BroadcastMissionStatus :: Notification types: |%1| for broadcasting mission status: %2",DMS_PlayerNotificationTypes,_message];
|
2015-08-27 07:44:23 +00:00
|
|
|
};
|
2015-08-28 21:52:56 +00:00
|
|
|
|
2015-10-04 03:32:42 +00:00
|
|
|
if ((typeName _message) != "STRING") then
|
2015-08-31 19:25:32 +00:00
|
|
|
{
|
2015-10-04 03:32:42 +00:00
|
|
|
_message = str _message;
|
2015-08-28 21:52:56 +00:00
|
|
|
};
|
2015-08-31 19:25:32 +00:00
|
|
|
|
2015-08-28 21:52:56 +00:00
|
|
|
{
|
|
|
|
private "_args";
|
|
|
|
|
2015-10-04 03:32:42 +00:00
|
|
|
switch (toLower _x) do
|
|
|
|
{
|
|
|
|
case "systemchatrequest":
|
|
|
|
{
|
|
|
|
[_x, [format ["%1: %2",toUpper _missionName,_message]]] call ExileServer_system_network_send_broadcast;
|
|
|
|
};
|
|
|
|
|
|
|
|
case "standardhintrequest":
|
|
|
|
{
|
|
|
|
[_x, [format ["<t color='%1' size='1.25'>%2</t><br/> %3",_titleColor,_missionName,_message]]] call ExileServer_system_network_send_broadcast;
|
|
|
|
};
|
|
|
|
|
|
|
|
case "dynamictextrequest":
|
|
|
|
{
|
|
|
|
//Unfortunately that doesn't work, so I have to do some funky stuff...
|
|
|
|
//[_x, [format ["%1<br/>%2",toUpper _missionName,_message], 0, DMS_dynamicText_Size, DMS_dynamicText_Color]] call ExileServer_system_network_send_broadcast;
|
|
|
|
|
|
|
|
[
|
|
|
|
format ['<t color="%1" size="1" >%2</t><br/><t color="%3" size="%4" >%5</t>',_titleColor,_missionName,DMS_dynamicText_Color,DMS_dynamicText_Size,_message],
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
10,
|
|
|
|
1
|
|
|
|
] remoteExec ["BIS_fnc_dynamicText", -2];
|
|
|
|
};
|
2015-08-28 21:52:56 +00:00
|
|
|
|
2015-10-04 03:32:42 +00:00
|
|
|
default { diag_log format ["DMS ERROR :: Unsupported Notification Type in DMS_PlayerNotificationTypes: %1 | Calling parameters: %2",_x,_this]; };
|
|
|
|
};
|
2015-09-04 16:35:19 +00:00
|
|
|
} forEach DMS_PlayerNotificationTypes;
|