Server

Tip

This is a global variable named Server. It is not possible to initialize or create a new instance. It’s just a global variable.

Note

This is a Server only Namespace.

Attention

This page is under construction.

Events

Name

Parameters

Description

Console

string Text

Called when a console command is submitted

Start

Server has been started.

Stop

Server has been stopped.

Tick

number DeltaTime

Is called every 30 ms by default. Only small operations should be performed here, otherwise this can lead the server to delays.

Examples

-- prints "Server started" when the server is starting
Server:on("Start", function()
    print("Server started")
end)

-- prints "Server stopped" when the server stops / shutdown
Server:on("Stop", function()
    print("Server stopped")
end)

-- prints the tick-delta time about every 30 ms
Server:on("Tick", function(ticktime)
    print("Tick: " .. ticktime)
end)