OnPlayerQuit: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Event|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|OnPlayerQuit}} {{FuncParameters}} == Example == __EDIT_ME__ {{RelatedFunctions}} {{ServerEvents}}"
 
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Info|Event|Server|1.0}}
{{Info|Event|Server|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Event called when a player leaves the server.}}


{{FuncSyntax|OnPlayerQuit}}
{{FuncSyntax|OnPlayerQuit(player)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|player|The player who has quit.}}
== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua">
function OnPlayerQuit(player)
AddPlayerChatAll(GetPlayerName(player).." left the server.")
end
AddEvent("OnPlayerQuit", OnPlayerQuit)
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
{{ServerEvents}}
{{PlayerServerEvents}}

Latest revision as of 20:34, 31 August 2020

OnPlayerQuit

Type: Event
Context: Server
Introduced: v1.0

Description

Event called when a player leaves the server.

Syntax

OnPlayerQuit(player)

Parameters

  • player
    The player who has quit.

Example

function OnPlayerQuit(player)
	AddPlayerChatAll(GetPlayerName(player).." left the server.")
end
AddEvent("OnPlayerQuit", OnPlayerQuit)

See also