ClosePlayerLoadingScreen
Ends a player’s loading screen - one that the interface asked to keep up until the mode says so.
Normally the loading screen ends by itself when the player has spawned. An interface can ask for more in its ui.toml:
manual_shutdown = true under [components.loading] keeps the screen over the game past the spawn until this call,
until the player’s client script calls its own CloseLoadingScreen or the loading page calls loading.done, or - the
limit - 240 seconds after the world is ready. That is the time for the mode to load a character, or to let a page finish, before the player sees the world. A
close that comes before the player has spawned waits for the spawn. (cursor = true under the same heading asks for the
mouse cursor on the loading screen, for a page that has something to click.)
Without manual_shutdown the spawn ends the screen and this call changes nothing. The screen shows once for a run of the
game: a player who leaves and joins again without closing the game sees no loading screen the second time. The answer
is true when the request was handed to the player’s game; false and "no such player" when it could not be.
Syntax
Section titled “Syntax”ClosePlayerLoadingScreen(pid)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
Returns
Section titled “Returns”true, or false, reason - the reason as a person reads it ("no such player")
Example
Section titled “Example”-- the interface's ui.toml has manual_shutdown = true under [components.loading]:-- the screen stays up over the spawn until the character is infunction OnPlayerSpawn(pid) loadCharacter(pid, function() ClosePlayerLoadingScreen(pid) end)endSee also
Section titled “See also”SetPlayerLoadingHandover · OnPlayerSpawn · the Web interface group of the index
