Lua Events/OnConnectionStateChanged

From PZwiki
< Lua Events
Revision as of 22:35, 13 June 2023 by Faalagorn (talk | contribs) (Faalagorn moved page Lua Events/OnConnectionStateChanged to Lua Events/OnConnectionStateChanged: Avoid Modding: prefix)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)



Event

OnConnectionStateChanged

Description

When a player is connecting to the server, the connection is going through different stages. This event is triggered for each of these stages of the initial connection.

Parameters

  • String The current state of the connection that has changed.
  • String The reason leading to the state change. It can be null.

Examples

local function OnConnectionStateChanged(state, reason)
	-- Your code here
end

Events.OnConnectionStateChanged.Add(OnConnectionStateChanged)

See also