Arma 3 Scripting

Command in Multiplayer, Event Handlers

onPlayerDisconnected

Also available as Markdown and JSON, or read the original wiki page.

Description

This command will execute attached code whenever a player is leaving an MP session. The code will receive a number of special variables:

Syntax

onPlayerDisconnected code

Parameters:

Returns: Nothing

Examples

Example 1

onPlayerDisconnected {diag_log [_id, _uid, _name]};

Example 2

onPlayerDisconnected {
    if (count allPlayers == 0) then {
        endMission "END1";
    };
};

Multiplayer

In multiplayer onPlayerDisconnected is executed only on the server.

Note

Arma 3: Use playerDisconnected or HandleDisconnect instead in Arma 3.

See also

onPlayerConnected · didJIP · didJIPOwner · Arma 3: Mission Event Handlers