haxball / haxball-issues

114 stars 43 forks source link

HAXBALL HEADLESS HOST "SUPERADMIN" #743

Open lguinho opened 5 years ago

lguinho commented 5 years ago

Hey, Is it possible to add room administrator rights after entering the password in the chat window by the user, off course, the password is generated by the host let's put it through the command "/adminpass" It would be very useful when setting up a room for VPS.

rogerTKF commented 5 years ago

Se você quiser eu posso te ajudar com o script, eu sou o tiki host das salas / BG / se quiser conversar e quiser umas dicas, chama no discord ( tiki#7014 ).

lguinho commented 5 years ago

Me ajuda ai mano meu email : srigor1998@gmail.com

kingjasko commented 5 years ago

add this somewhere in your code, change "!password" to whatever you want to be your password, type that into chat and you will get admin, same for other people who will know the password.

room.onPlayerChat = function(player, message) { if (message == "!password"){ room.setPlayerAdmin(player.id, true); return false; // The message won't be displayed }