Advertisement
Eddlm

Queued Help Text

Jan 8th, 2016
464
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.80 KB | None | 0 0
  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.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement