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

Function

isPlayerConnected

ServerPlayersTrilogy Hub only

Checks whether a player is still on the server. Useful in delayed functions.

Syntax

bool isPlayerConnected(player thePlayer)

Arguments

thePlayerplayer
The player.

Returns

true if connected.

Example

setTimer(function()
    if isPlayerConnected(player) then
        outputChatBox("Minęła minuta.", player)
    end
end, 60000, 1)