Advertisement
corbuhh

Untitled

Sep 1st, 2014
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.70 KB | None | 0 0
  1. /*
  2. ---Creds to maca134 for this---
  3. Mission Side
  4. init.sqf:
  5. [] execVM "your\path\here\remote_messages.sqf";
  6. */
  7.  
  8. fnc_remote_message = {
  9.         private ["_type", "_message", "_player"];
  10.         _type = _this select 0;
  11.         _message = _this select 1;
  12.         if (count _this > 2) then {
  13.                 _player = _this select 2;
  14.                 if (_player == player) then {
  15.                         switch (_type) do {
  16.                                 case "globalChat": {
  17.                                         player globalChat _message;
  18.                                 };
  19.                                 case "hint": {
  20.                                         hint _message;
  21.                                 };
  22.                                 case "titleCut": {
  23.                                         titleCut [_message, "PLAIN DOWN", 3];
  24.                                 };
  25.                                 case "titleText": {
  26.                                         titleText [_message, "PLAIN DOWN"]; titleFadeOut 10;
  27.                                 };
  28.                         };
  29.                 };
  30.         } else {
  31.                 switch (_type) do {
  32.                         case "hint": {
  33.                                 hint _message;
  34.                         };
  35.                         case "titleCut": {
  36.                                 titleCut [_message,"Plain Down",3];
  37.                         };
  38.                         case "titleText": {
  39.                                 titleText [_message, "PLAIN DOWN"]; titleFadeOut 10;
  40.                         };
  41.                 };
  42.         };
  43. };
  44.  
  45. "customRemoteMessage" addPublicVariableEventHandler {(_this select 1) call fnc_remote_message;};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement