(info) 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

ParameterTypeMandatoryDescriptionGame version
player

Number

(tick)

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

(warning) 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)");
}
Availability 3.2+

Requires:

  • Warzone 3.2
Contents

Jump to:

Â