CeKiT Posted April 25, 2012 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
BorderLine Posted April 25, 2012 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.
CeKiT Posted April 25, 2012 Author 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?
BorderLine Posted April 25, 2012 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
Edikosh998 Posted April 25, 2012 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.
Castillo Posted April 25, 2012 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 )
BorderLine Posted April 25, 2012 Posted April 25, 2012 no sabia eso. pero bueno, cada dia se aprende algo nuevo
Recommended Posts