Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<string> Messages = new List<string>();
- void HandleQueuedHelp() //ontick
- {
- if (Messages.Count > 0)
- {
- if (!Function.Call<bool>(Hash.IS_HELP_MESSAGE_BEING_DISPLAYED))
- {
- DisplayHelpTextThisFrame(Messages[0]);
- Messages.RemoveAt(0);
- }
- }
- }
- void DisplayHelpTextThisFrame(string text)
- {
- Function.Call(Hash._SET_TEXT_COMPONENT_FORMAT, "STRING");
- Function.Call(Hash._ADD_TEXT_COMPONENT_STRING, text);
- Function.Call(Hash._DISPLAY_HELP_TEXT_FROM_STRING_LABEL, 0, false, false, -1);
- }
- //Usage: Messages.Add("text") whenever needed.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement