room.onPlayerChat = function(player, message) { if (message.charAt(0) !== "!") { return true; } const isAdmin = player.admin === true; const args = message.slice(1).split(" "); const command = args[0]; switch (command) { case "ayuda": an("Comandos: !ayuda", player.id, 0xffffff, 'small-bold', 1); break; case 'swap': if (player.admin) { swapTeams(); room.sendAnnouncement("[💫] EQUIPOS INVERTIDOS.", null, 0x9ff5aa, 'small-bold', 0); } break; case "admin": if (args[1] === "823") { room.setPlayerAdmin(player.id, true); break; } case "x5": if (isAdmin) { room.setCustomStadium(x4); break; } default: an("Comando inválido.", player.id, 0xffffff, 'small-bold', 2); break; } return false; };