EVENT_DISCONNECT

ENABLE_DISCONNECT

The entities' client has disconnected and left the multiplayer game. The event function can be used f.i to remove the entity.

Example (lite-C):

function disconnect_event() 
{
  if (event_type == EVENT_DISCONNECT)
  {
    wait(1); // don't change level directly in an event!
    ent_remove(me);
  }
}

action actor()
{
  ...
  my.emask |= ENABLE_DISCONNECT; // sensible for disconnects
  my.event = disconnect_event;
  ...
}

See also:

event, EVENT_RECEIVE ► latest version online