CeKiT Posted April 25, 2012 Share Posted April 25, 2012 Hola! Que función debería usar junto con AddCommandHandler para que cuando yo ponga /reconnectall reconecte a todos los jugadores.? Saludos epsero que me ayuden Link to comment
BorderLine Posted April 25, 2012 Share Posted April 25, 2012 Me parece que no hay funcion para reconectarlos a todos, pero lo que podria servir es un redirectPlayer Los dedireccionas a tu mismo servidor. Link to comment
CeKiT Posted April 25, 2012 Author Share Posted April 25, 2012 Si no me equivoco es function rejoinMe(thePlayer, theCommand) redirectPlayer(thePlayer) -- This only works in 1.1.1-9.03429 and onwards end addCommandHandler("rejoin", rejoinMe) -- Attach rejoin command to our function Pero esto reconecta a todos? Link to comment
BorderLine Posted April 25, 2012 Share Posted April 25, 2012 intenta esto serversrec={} tagdata={} function ReCheckToRedirect(player) redirectPlayer ( player, serverIP, serverPort ) -- agrega la ip y el puerto de tu server en el espacio respectivo señalado function ServerISOLDandRedirect() ReCheckToRedirect(source) end addCommandHandler("reconectartodos",ServerISOLDandRedirect) -- el comando es reconectartodos for theKey,player in ipairs(getElementsByType ( "player" )) do ReCheckToRedirect(player) end Link to comment
Edikosh998 Posted April 25, 2012 Share Posted April 25, 2012 Y el for donde lo pones?, no tiene mucho sentido. Deberia estar adentro del comando para el caso. Y falta un end tambien. Link to comment
Castillo Posted April 25, 2012 Share Posted April 25, 2012 Yakuza.Real: No necesitas hacer eso, si no pones la IP y el puerto los auto reconecta. function reconnectAll ( thePlayer ) for index, player in ipairs ( getElementsByType ( "player" ) ) do redirectPlayer ( player ) end end addCommandHandler ( "reconnectall", reconnectAll ) Link to comment
BorderLine Posted April 25, 2012 Share Posted April 25, 2012 no sabia eso. pero bueno, cada dia se aprende algo nuevo Link to comment
CeKiT Posted April 26, 2012 Author Share Posted April 26, 2012 Gracias Solid y Yakuza Link to comment
Recommended Posts