ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setLoadingScreen

Function

setLoadingScreen

ServerServerTrilogy Hub only

Sets a custom server loading screen that players see while joining: a PNG/JPG image from the resource (up to 2 MB), a text and a list of tips shown in turn. The screen belongs to the resource - when it stops, the default Trilogy Hub screen returns.

Syntax

bool setLoadingScreen([string image = false, string text = "", table tips = {}])

Arguments

imagestring, optional = false
Image path in the resource, or false = no image.
textstring, optional = ""
Main text (e.g. the server name).
tipstable, optional = {}
A table of tips.

Returns

true on success; false with a warning (e.g. image too large).

Example

addEventHandler("onResourceStart", resourceRoot, function()
    setLoadingScreen("img/loading.jpg", "Witaj na Los Santos RP", {
        "Wpisz /pomoc, aby zobaczyc komendy",
        "Regulamin znajdziesz na naszym Discordzie",
    })
end)

See also