API
Exports and client events for notifications, announcements, ads, team chat, and progress bars
More HUD gives your other scripts a small API: exports you call from client scripts, and client events you trigger locally or, from the server, for a specific player. Everything below runs on the player's client. Text that contains a word from MS.Notify.badwords is dropped. Invalid arguments either fall back to a default or the call is ignored, as noted for each entry; enable MS.Settings.dev_mode to see ignored calls in the console.
Calling an export is the same everywhere: use the resource name more_hud, the export name, and the arguments in the order listed. Optional arguments can be left out, and every time is in milliseconds. If a time is missing or not above 0, the default from the Configuration page is used.
Notify export
Shows a notification in the design set by MS.Layout.notify. Call it from any client script as the Notify export of more_hud. Arguments in order: level, title, message, time.
levelstringrequiredsuccess, error, info, or warning. Anything else is shown as info.
titlestringdefault default titleHeading of the notification. A default title is used when it is not a string.
messagestringrequiredText of the notification. A default text is used when it is not a string. The notification is dropped when it holds a word from MS.Notify.badwords.
timenumberdefault 5000Milliseconds on screen. The MS.Notify time (5000) is used when it is missing or not above 0.
Announce export
Shows one announcement at the top of the screen in the design set by MS.Layout.announce. A new announcement replaces the one on screen. Call it as the Announce export of more_hud. Arguments in order: title, message, subtitle, time. If the title or message is not a string, the call is ignored.
titlestringrequiredHeading of the announcement, for example NEW GIVEAWAY. Must be a string.
messagestringrequiredText under the title. Must be a string. The announcement is dropped when the title, message, or subtitle holds a word from MS.Notify.badwords.
subtitlestringdefault A word under the title, for example STARTED. Only design 4 shows it. Left out when it is not a string.
timenumberdefault 10000Milliseconds on screen. MS.Announce.time (10000) is used when it is missing or not above 0.
Teamchat export
Shows a team chat message among the notifications. Call it as the Teamchat export of more_hud. Arguments in order: message, rank, name, time. If message, rank, or name is not a string, the call is ignored.
messagestringrequiredText of the message. The message is dropped when it holds a word from MS.Notify.badwords.
rankstringrequiredRank of the sender, for example Moderator.
namestringrequiredWho sent the message.
timenumberdefault 5000Milliseconds on screen. The MS.Notify time (5000) is used when it is missing or not above 0.
Lifeinvader export
Shows a Lifeinvader ad among the notifications. Players can copy the ad's number with the notification copy key (MS.Notify.copy_key). Call it as the Lifeinvader export of more_hud. Arguments in order: message, number, name, time. Invalid arguments make the call be ignored.
messagestringrequiredText of the ad. The ad is dropped when it holds a word from MS.Notify.badwords.
numberstring or numberrequiredPhone number shown with the ad, which players can copy. A number is converted to text.
namestringrequiredName of the advertiser.
timenumberdefault 5000Milliseconds on screen. The MS.Notify time (5000) is used when it is missing or not above 0.
Business export
Shows a business notice among the notifications, built like the Lifeinvader ad but for a business. Players can copy its number with the notification copy key (MS.Notify.copy_key). Call it as the Business export of more_hud. Arguments in order: message, number, name, time. Invalid arguments make the call be ignored.
messagestringrequiredText of the notice. The notice is dropped when it holds a word from MS.Notify.badwords.
numberstring or numberrequiredPhone number shown with the notice, which players can copy. A number is converted to text.
namestringrequiredName of the business.
timenumberdefault 5000Milliseconds on screen. The MS.Notify time (5000) is used when it is missing or not above 0.
Progressbar export
Starts the progress bar in the design set by MS.Layout.progressbar. Only one bar runs at a time. It fills over its duration and then hides. Call it as the Progressbar export of more_hud. Arguments in order: time, label. Use the HideProgressbar export to hide a running bar early.
timenumberdefault 5000Duration of the bar in milliseconds. 5000 is used when it is missing or not above 0.
labelstringdefault default textText above the bar. The default progress text is used when it is not a string.
HideProgressbar export
Hides the progress bar right away, for example when the action it showed was cancelled. Call it as the HideProgressbar export of more_hud. It takes no arguments.
Farmboost export
Shows a farm boost post among the notifications. Call it as the Farmboost export of more_hud. Arguments in order: message, boost, time.
messagestringrequiredText of the post. The post is dropped when it holds a word from MS.Notify.badwords.
boostnumberrequiredBoost value shown with the post, for example 30.
timenumberdefault 5000Milliseconds on screen. The MS.Notify time (5000) is used when it is missing or not above 0.
HelpKey export
Shows a key prompt on screen, in the design set by MS.Layout.helpkey, for example the E key with a short text. Call it as the HelpKey export of more_hud and hide it again with the HideHelpKey export. Arguments in order: key, label.
keystringrequiredThe key shown on the prompt, for example E.
labelstringrequiredText next to the key that says what pressing it does, for example to interact.
HideHelpKey export
Hides the key prompt that the HelpKey export showed. Call it as the HideHelpKey export of more_hud. It takes no arguments.
Client event more_hud::client:notify
Does the same as the Notify export. Trigger it on the local client, or on a player from the server with a client event trigger, and pass the arguments in this order: level, title, message, time. The values behave exactly as described for the Notify export.
levelstringrequiredsuccess, error, info, or warning. Anything else is shown as info.
titlestringdefault default titleHeading of the notification. A default title is used when it is not a string.
messagestringrequiredText of the notification. A default text is used when it is not a string. The notification is dropped when it holds a word from MS.Notify.badwords.
timenumberdefault 5000Milliseconds on screen. The MS.Notify time (5000) is used when it is missing or not above 0.
Client event more_hud::client:announce
Shows an announcement like the Announce export, but takes only a title and a message. There is no subtitle and no time argument, so the announcement uses the default time from MS.Announce.time. Pass the arguments in this order: title, message.
titlestringrequiredHeading of the announcement. Must be a string, otherwise the event is ignored.
messagestringrequiredText under the title. Must be a string. The announcement is dropped when the title or message holds a word from MS.Notify.badwords.
Client event more_hud::client:teamchat
Shows a team chat message like the Teamchat export, but without a time argument, so the default time from MS.Notify is used. Pass the arguments in this order: message, rank, name.
messagestringrequiredText of the message. The message is dropped when it holds a word from MS.Notify.badwords.
rankstringrequiredRank of the sender, for example Moderator.
namestringrequiredWho sent the message.
Commands and keys
The copynotify command copies the content of a notification to the clipboard, which is the number for Lifeinvader ads and business notices. It is bound to the key in MS.Notify.copy_key, G by default, and players can rebind it in their key settings. The staff commands announce and teamchat send an announcement and a team chat message to players. They and the deathtimeout command are limited to the permission groups set in MS.Commands. The exclusionzone command is set up in MS.ExclusionZone, and the HUD menu opens with the key in MS.HudMenu.key (F10) or with the hud command.
With MS.Settings.dev_mode enabled, the testhud command shows a sample of every notification type, an announcement, a Lifeinvader ad, a business notice, a team chat message, a farm boost, a help key, and a progress bar. The minimapfit command (left, bottom, size) tests minimap values live.
Customization hooks
Three functions in cl_config.lua are meant to be edited: MS.GetCoins returns the player's coin count for the Coins module (0 by default), MS.GetNitro returns a vehicle's NOS level from 0.0 to 1.0, and MS.GetMileage returns a vehicle's mileage in km. Change them to read the values from your own systems. The Configuration page lists them as well.
Last updated