Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 'leave':
- if (gameStatus[room] !== 'signup') return false;
- if (playerData[room][toId(by)]) {
- //re-make playerlist
- var pIndex = playerCount[room].indexOf(toId(by));
- var pushPlayer = [];
- for(var x = 0; x < playerCount[room].length; x++){
- if(x === pIndex){
- continue;
- }
- pushPlayer.push(playerCount[room][x]);
- }
- //reset playerlist
- playerCount[room] = pushPlayer;
- this.say(',' + by, 'Aww, next time then!')
- }
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement