PlayerQuit: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "This event is triggered when a player quit from the server. =='''Parameters'''== * '''player''' - player, which quit from the server. * '''exitType ''' - exit type from the s...")
 
No edit summary
Line 4: Line 4:
* '''player''' - player, which quit from the server.
* '''player''' - player, which quit from the server.
* '''exitType ''' - exit type from the server:
* '''exitType ''' - exit type from the server:
* disconnect
  * disconnect
* timeout
  * timeout
* kicked
  * kicked
* '''reason''' - reason of quit from the server.
* '''reason''' - reason of quit from the server.



Revision as of 21:37, 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.

Example

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

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

});