event onPlayerDisconnect (server-side)
Available since version: 0.3.0
Triggered when a player disconnects from the server.
Parameters
void onPlayerDisconnect(int player_id, int reason)
intplayer_id: The id of the player that disconnected.intreason: The reason why player got disconnected. See Network constants.