SHARE
TWEET

Queued Help Text

Eddlm Jan 8th, 2016 (edited) 143 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. Do HandleMessages(); ontick
  3. use MessageQueue.Add("Text"); to add text messages to the queue
  4. */
  5.  
  6.     List<String> MessageQueue = new List<String>();
  7.     int MessageQueueInterval = 8000;
  8.     int MessageQueueReferenceTime =0;
  9.     void HandleMessages()
  10.     {
  11.         if (MessageQueue.Count > 0)
  12.         {
  13.             Function.Call(Hash._SET_TEXT_COMPONENT_FORMAT, "STRING");
  14.             Function.Call(Hash._ADD_TEXT_COMPONENT_STRING, MessageQueue[0]);
  15.             Function.Call(Hash._0x238FFE5C7B0498A6, 0, 0, 1, -1);
  16.         }
  17.         if (Game.GameTime > MessageQueueReferenceTime + MessageQueueInterval)
  18.         {
  19.             if (MessageQueue.Count>0)
  20.             {
  21.                 MessageQueue.RemoveAt(0);
  22.             }
  23.             MessageQueueReferenceTime = Game.GameTime;
  24.         }
  25.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top