Schoening
This is my server.js command for the button one:
else if (new_data[0] == 'DC')
{
socket.broadcast.emit("message",
'DC,' + mySelf[0] + ',' + mySelf[1] + ',' + mySelf[2] + ',' + mySelf[3] + ',' + mySelf[4]);
delete entities[myNumber];
console.log('>> ' + mySelf[7] + ' disconnected');
}
This deletes the player, when hit the button, — 's deletes on closing the browser. I tested it, and if you have the BOTH in the .js, it's the best. :)
(Btw I'm BarneyK, but I get internal server error on login:( )