PlayerQuit: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
Line 7: Line 7:
**timeout
**timeout
**kicked
**kicked
* '''reason''' - reason of quit from the server.
* '''reason''' - reason of quit from the server if exit type is "kicked".


=='''Example'''==
=='''Example'''==

Revision as of 21:38, 27 December 2016

This event is triggered when a player quit from the server.

Parameters

  • player - player, which quit from the server.
  • exitType - exit type from the server:
    • disconnect
    • timeout
    • kicked
  • reason - reason of quit from the server if exit type is "kicked".

Example

function playerJoinHandler(player) {
  console.log(player.name + " joined to server.");
}

mp.events.add(
{
  "playerQuit": playerJoinHandler

});