Other great resources: Official JS API docs, Scripting Forum
eventPlayerLeft()
Triggers if a player leaves the game...
Syntax
function eventPlayerLeft(player) {
// do stuff
}Parameters & References
Parameter | Type | Mandatory | Description | Game version |
|---|---|---|---|---|
player | Number | The ID of the player that left. | 3.2 |
Return value
Warzone does not process the event handler's return value.
Notes
This event only occurs in multiplayer games, where a network peer disconnects from the game:
Player rage quit, or...
The internet is broken
If the game host disconnects, the game ends.
You can determine if a game is multiplayer using the isMultiplayer global.
Example
function eventPlayerLeft(id) {
console("Player "+id+" just rage quit! (or their internet connection dropped)");
}