Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. /*
  2. File: fn_broadcast.sqf
  3. Author: Bryan "Tonic" Boardwine
  4.  
  5. Description:
  6. Broadcast system used in the life mission for multi-notification purposes.
  7. */
  8. private["_type","_message"];
  9. _type = [_this,0,0,[[],0]] call BIS_fnc_param;
  10. _message = [_this,1,"",[""]] call BIS_fnc_param;
  11. _localize = [_this,2,false,[false]] call BIS_fnc_param;
  12. if (_message isEqualTo "") exitWith {};
  13.  
  14. if (_localize) exitWith {
  15. _arr = _this select 3;
  16. _msg = switch (count _arr) do {
  17. case 0: {localize _message;};
  18. case 1: {format[localize _message,_arr select 0];};
  19. case 2: {format[localize _message,_arr select 0, _arr select 1];};
  20. case 3: {format[localize _message,_arr select 0, _arr select 1, _arr select 2];};
  21. case 4: {format[localize _message,_arr select 0, _arr select 1, _arr select 2, _arr select 3];};
  22. };
  23.  
  24. if (_type isEqualType []) then {
  25. for "_i" from 0 to (count _type)-1 do {
  26. switch (_type select _i) do {
  27. case 0: {systemChat _msg;};
  28. case 1: {hint _msg;};
  29. case 2: {titleText[_msg,"PLAIN"];};
  30. };
  31. };
  32. } else {
  33. switch (_type) do {
  34. case 0: {systemChat _msg;};
  35. case 1: {hint _msg;};
  36. case 2: {titleText[_msg,"PLAIN"];};
  37. };
  38. };
  39. };
  40.  
  41. if (_type isEqualType []) then {
  42. for "_i" from 0 to (count _type)-1 do {
  43. switch (_type select _i) do {
  44. case 0: {systemChat _message};
  45. case 1: {hint format["%1", _message]};
  46. case 2: {titleText[format["%1",_message],"PLAIN"];};
  47. };
  48. };
  49. } else {
  50. switch (_type) do {
  51. case 0: {systemChat _message};
  52. case 1: {hint format["%1", _message]};
  53. case 2: {titleText[format["%1",_message],"PLAIN"];};
  54. };
  55. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement