Skip to content

Event player OR client disconnect dont works #239

Answered by saul
ghost asked this question in Questions
Discussion options

You must be logged in to vote

So it looks like player_disconnect is not networked - you'll have to listen for the player entity being deleted. This is guaranteed to only happen at disconnect time:

      demoFile.entities.on('beforeremove', e => {
        if (e.entity.serverClass.name !== 'CCSPlayer') {
          return;
        }

        console.log('%s left the game', e.entity.name);
      });

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by saul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #75 on February 28, 2021 14:00.