Skip to main content

πŸ’» Hud

Exports​

notify Export​

Parameters​

title: Title Message (string)

  • title: Title Message (string)
  • message: Subtitle Message (string)
  • sort: Notify Sort Type ("info", "success", "warn", "error") (string)
  • time: Showing time in milliseconds (1000 = 1 second) (number)

Usage​

exports['sky_hud']:notify(title, message, sort, time)

announce Export​

Parameters​

  • title: Announce Title (string)
  • message: Subtitle Message (string)
  • time: Showing time in milliseconds (1000 = 1 second) (number)

Usage​

exports['sky_hud']:announce(title, message, time)

This export allows you to display an announcement with a specified title and message. The announcement will be visible for the specified time duration.

pressE Export​

Parameters​

  • title: Press-E Title (string)
  • letter: Press-E Letter (string)
note

The maximum wait time for this export is approximately 200 milliseconds.

Usage​

exports['sky_hud']:pressE(title, letter)

Use this export to trigger a "Press E" prompt with a specified title and letter. This prompt will be visible for a short duration, allowing the player to interact with it.

openRequest Export​

Parameters​

  • title: Request Title (string)
  • message: Request Message (string)
  • time: Wait time until the request automatically closes in milliseconds (1000 = 1 second) (number)
  • callback: Callback function (function)
note

If the player accepts the request, the callback function will be called with true; otherwise, it will be called with false.

Usage​

exports['sky_hud']:openRequest('Hud-Showcase', 'Do you want to test something?', 5000, function(accepted)
print('Accepted: ', accepted)
end)

This export allows you to open a request prompt with a specified title and message. The prompt will wait for the player's response for the given time duration. If the player accepts the request, the provided callback function will be invoked with true; otherwise, it will be invoked with false.

showVoiceChat Export​

Parameters​

  • show: Show or hide the voice chat connected screen (boolean)

Usage​

exports['sky_hud']:showVoiceChat(show)

Use this export to show or hide the voice chat connected screen based on the show parameter. Set show to true to display the screen, and false to hide it.

Commands​

/editHud​

This command allows you to edit the HUD settings in real-time. You can use this command to customize the position of the elements.

/resetHud​

This command resets the HUD settings to their default values.

/announce​

This command allows you to send an announcement to all players on the server. You can specify the title and message for the announcement.

txAdmin Announcement​

Replaces the default txAdmin announcement with sky_hud announcement system.

    txAdminEvents = {
-- INFO: Texts can be set in locale file
useAnnounce = true, -- enable/disable txadmin events (announcement) IMPORTANT: disable txadmin announce in settings > game > Hide Announcement Notification to you use sky-systems announce
restartAnnounce = true, -- enable/disable custom txadmin restart announce (for example: "Server restarts in 20 Minutes!"). IMPORTANT: disable txadmin announce in settings > game > Hide Scheduled Restart Warnings to you use sky-systems restart announce
},

Deactivate default txAdmin Announcement​

To use the sky_hud announcement system, you need to deactivate the default txAdmin announcement system. To do this, navigate to the txAdmin panel and disable the following options:

  1. Navigate to Settings > Game. txadminnav txadminsettings
  2. Disable the Hide Announcement Notification and Hide Scheduled Restart Warnings options. txadminsettings2 txadminsettings3