DMS_Exile/@ExileServer/addons/a3_dms/scripts/fn_BroadcastMissionStatus.sqf
eraser1 829943bf65 mI gramur Iz gUd (new mission, function, and features)
* **NEW CONFIG VALUES**:

|DMS_MarkerText_ShowMissionPrefix|
|DMS_MarkerText_MissionPrefix|
|DMS_MarkerText_ShowAICount|
|DMS_MarkerText_AIName|
* New function: DMS_fnc_SpawnPersistentVehicle. It will spawn
inaccessible vehicles by default and convert VALID pincode inputs to the
proper format.
* New mission: "Car Thieves" (thieves.sqf). It uses the new
DMS_fnc_SpawnPersistentVehicle. When the mission is completed
successfully, the code is displayed in the completion message.
* You can now add a "prefix" to the marker text of each mission.
* You can now display the number of remaining AI in the marker text (it
should update about every 15 seconds).
* Rearranged the missions in the config to look prettier. Don't judge.
* Added the "Zamak", "Tempest", and "HEMMT" to "DMS_TransportTrucks"
array. Removed "Exile_Car_Van_Black"
* "dynamicTextRequest" messages will now appear at the top of the
screen, so it shouldn't distract/block stuff in focus.
* Fixed some spelling, improved some grammar (will require mission
updates, it's really minor though).
2015-10-04 22:27:22 -05:00

73 lines
1.7 KiB
Plaintext

/*
DMS_fnc_BroadcastMissionStatus
Created by eraser1
Usage:
_message call DMS_fnc_BroadcastMissionStatus;
Requires "DMS_PlayerNotificationTypes".
Notification type "dynamicTextRequest" requires "DMS_dynamicText_Size" and "DMS_dynamicText_Color".
*/
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","",[""]]
];
if (DMS_DEBUG) then
{
diag_log format["DMS_DEBUG BroadcastMissionStatus :: Notification types: |%1| for broadcasting mission status: %2",DMS_PlayerNotificationTypes,_message];
};
if ((typeName _message) != "STRING") then
{
_message = str _message;
};
{
private "_args";
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":
{
(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
])
remoteExecCall ["DMS_CLIENT_fnc_spawnDynamicText", -2];
};
default { diag_log format ["DMS ERROR :: Unsupported Notification Type in DMS_PlayerNotificationTypes: %1 | Calling parameters: %2",_x,_this]; };
};
} forEach DMS_PlayerNotificationTypes;