Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Do HandleMessages(); ontick
- use MessageQueue.Add("Text"); to add text messages to the queue
- */
- List<String> MessageQueue = new List<String>();
- int MessageQueueInterval = 8000;
- int MessageQueueReferenceTime =0;
- void HandleMessages()
- {
- if (MessageQueue.Count > 0)
- {
- Function.Call(Hash._SET_TEXT_COMPONENT_FORMAT, "STRING");
- Function.Call(Hash._ADD_TEXT_COMPONENT_STRING, MessageQueue[0]);
- Function.Call(Hash._0x238FFE5C7B0498A6, 0, 0, 1, -1);
- }
- if (Game.GameTime > MessageQueueReferenceTime + MessageQueueInterval)
- {
- if (MessageQueue.Count>0)
- {
- MessageQueue.RemoveAt(0);
- }
- MessageQueueReferenceTime = Game.GameTime;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement