MisterZ Posted January 13, 2015 Share Posted January 13, 2015 LOL!!! ami me dice que soy de estas unidos ._. IP: 198.55.97.196 Country: United States Country code: US Region: California Region code: CA City: Los Angeles Zip Code: 90001 Latitude: 33.9735 Longitude: -118.2452 Timezone: America/Los_Angeles ISP: QuadraNet Organization: QuadraNet AS number/name: AS29761 QuadraNet, Inc DNS server: 208.67.219.13 (United States - OpenDNS, LLC) edns-client-subnet: 198.55.97.0 (United States - QuadraNet) Link to comment
MisterZ Posted January 13, 2015 Share Posted January 13, 2015 Ok Alexs Aca esta la foto el debug no da ningún error ni nada esta limpio: y haci tengo el Script Tal cual lo pusiste solo modifique el ChatBox: addEventHandler("onPlayerJoin", root, function() local ip = getPlayerIP(source) fetchRemote("http://ip-api.com/json/"..ip, outputJoin, "", false, source) end) function outputJoin(response, errno, thePlayer) local country = "N/N" local city = "Desconocida" if response ~= "Error" and errno == 0 then local joinData = fromJSON(response) if joinData and type(joinData) == 'table' then country = joinData.country city = joinData.city end end setElementData(thePlayer,"Country", country) outputChatBox("* "..getPlayerName(thePlayer).." Ha Entrado Al Servidor Desde: ["..city.."] ["..country.."]",root,220,140,105) end Link to comment
Alexs Posted January 13, 2015 Share Posted January 13, 2015 (edited) ¿Que información se muestra cuando entras a http://ip-api.com/json ? Edited January 13, 2015 by Guest Link to comment
MisterZ Posted January 13, 2015 Share Posted January 13, 2015 ¿Que información se muestra cuando entras a http://ip-api.com/json ? {"as":"AS29761 QuadraNet, Inc","city":"Los Angeles","country":"United States","countryCode":"US","isp":"QuadraNet","lat":33.9735,"lon":-118.2452,"org":"QuadraNet","query":"198.55.97.196","region":"CA","regionName":"California","status":"success","timezone":"America/Los_Angeles","zip":"90001"} Link to comment
Alexs Posted January 13, 2015 Share Posted January 13, 2015 ¿Estas seguro de que no utilizas ningún método que pudiese alterar los resultados? Link to comment
MisterZ Posted January 13, 2015 Share Posted January 13, 2015 ¿Estas seguro de que no utilizas ningún método que pudiese alterar los resultados? solo uso un programa para cambiar la IP pero eso no creo que afecte deveria funcionar o no ? si solo cambio la ip por una de estas unidos además puse la IP normal de argentina y sigue igual no me sale la ciudad solo la region Link to comment
lGalazArayal Posted January 13, 2015 Author Share Posted January 13, 2015 Ok Alexs Aca esta la foto el debug no da ningún error ni nada esta limpio: y haci tengo el Script Tal cual lo pusiste solo modifique el ChatBox: addEventHandler("onPlayerJoin", root, function() local ip = getPlayerIP(source) fetchRemote("http://ip-api.com/json/"..ip, outputJoin, "", false, source) end) function outputJoin(response, errno, thePlayer) local country = "N/N" local city = "Desconocida" if response ~= "Error" and errno == 0 then local joinData = fromJSON(response) if joinData and type(joinData) == 'table' then country = joinData.country city = joinData.city end end setElementData(thePlayer,"Country", country) outputChatBox("* "..getPlayerName(thePlayer).." Ha Entrado Al Servidor Desde: ["..city.."] ["..country.."]",root,220,140,105) end No funciona ¿Que más se puede hacer? Link to comment
Alexs Posted January 13, 2015 Share Posted January 13, 2015 Yo lo estuve probando antes de publicarlo y funcionó sin problemas. Link to comment
lGalazArayal Posted January 13, 2015 Author Share Posted January 13, 2015 Yo lo estuve probando antes de publicarlo y funcionó sin problemas. el meta asi esta el mio. "xNahu#,[M]ister" name="Joinquit-BR" type="script" /> Link to comment
lGalazArayal Posted January 13, 2015 Author Share Posted January 13, 2015 Yo lo estuve probando antes de publicarlo y funcionó sin problemas. entonces pasame tu recurso Link to comment
MisterZ Posted January 13, 2015 Share Posted January 13, 2015 entonces no soy yo solo ha Galaz también le pasa D: Link to comment
lGalazArayal Posted January 13, 2015 Author Share Posted January 13, 2015 entonces no soy yo solo ha Galaz también le pasa D: No hay caso que funcione Link to comment
Alexs Posted January 13, 2015 Share Posted January 13, 2015 ¿Le diste acceso a 'fetchRemote'? Link to comment
lGalazArayal Posted January 13, 2015 Author Share Posted January 13, 2015 ¿Le diste acceso a 'fetchRemote'? Como se hace eso? Link to comment
Tomas Posted January 13, 2015 Share Posted January 13, 2015 Desde el ACL. Por cierto, el responseData en caso de haber un error returna 'ERROR' no 'Error', addEventHandler("onPlayerJoin", root, function() local ip = getPlayerIP(source) fetchRemote("http://ip-api.com/json/"..ip, outputJoin, "", false, source) end) function outputJoin(response, errno, thePlayer) local country = "N/N" local city = "Desconocida" if response ~= "ERROR" and errno == 0 then local joinData = fromJSON(response) if joinData and type(joinData) == 'table' then country = joinData.country city = joinData.city end end setElementData(thePlayer,"Country", country) outputChatBox("* "..getPlayerName(thePlayer).." Ha Entrado Al Servidor Desde: ["..city.."] ["..country.."]",root,220,140,105) end Link to comment
lGalazArayal Posted January 13, 2015 Author Share Posted January 13, 2015 Desde el ACL.Por cierto, el responseData en caso de haber un error returna 'ERROR' no 'Error', addEventHandler("onPlayerJoin", root, function() local ip = getPlayerIP(source) fetchRemote("http://ip-api.com/json/"..ip, outputJoin, "", false, source) end) function outputJoin(response, errno, thePlayer) local country = "N/N" local city = "Desconocida" if response ~= "ERROR" and errno == 0 then local joinData = fromJSON(response) if joinData and type(joinData) == 'table' then country = joinData.country city = joinData.city end end setElementData(thePlayer,"Country", country) outputChatBox("* "..getPlayerName(thePlayer).." Ha Entrado Al Servidor Desde: ["..city.."] ["..country.."]",root,220,140,105) end espera que fetechremote de lo doy en autoaclacpanel? Link to comment
MisterZ Posted January 13, 2015 Share Posted January 13, 2015 Desde el ACL.Por cierto, el responseData en caso de haber un error returna 'ERROR' no 'Error', addEventHandler("onPlayerJoin", root, function() local ip = getPlayerIP(source) fetchRemote("http://ip-api.com/json/"..ip, outputJoin, "", false, source) end) function outputJoin(response, errno, thePlayer) local country = "N/N" local city = "Desconocida" if response ~= "ERROR" and errno == 0 then local joinData = fromJSON(response) if joinData and type(joinData) == 'table' then country = joinData.country city = joinData.city end end setElementData(thePlayer,"Country", country) outputChatBox("* "..getPlayerName(thePlayer).." Ha Entrado Al Servidor Desde: ["..city.."] ["..country.."]",root,220,140,105) end Solo da la región no la ciudad * MisterZ Ha Entrado Al Servidor Desde: [] [United Kingdom] Link to comment
Tomas Posted January 13, 2015 Share Posted January 13, 2015 Debes agregar el resource a un ACL donde tenga acceso a usar la función fetchRemote, por default el ACL 'Admin' trae ese right. Link to comment
Tomas Posted January 13, 2015 Share Posted January 13, 2015 Desde el ACL.Por cierto, el responseData en caso de haber un error returna 'ERROR' no 'Error', addEventHandler("onPlayerJoin", root, function() local ip = getPlayerIP(source) fetchRemote("http://ip-api.com/json/"..ip, outputJoin, "", false, source) end) function outputJoin(response, errno, thePlayer) local country = "N/N" local city = "Desconocida" if response ~= "ERROR" and errno == 0 then local joinData = fromJSON(response) if joinData and type(joinData) == 'table' then country = joinData.country city = joinData.city end end setElementData(thePlayer,"Country", country) outputChatBox("* "..getPlayerName(thePlayer).." Ha Entrado Al Servidor Desde: ["..city.."] ["..country.."]",root,220,140,105) end Solo da la región no la ciudad * MisterZ Ha Entrado Al Servidor Desde: [] [United Kingdom] Yo ahí no fixié nada para que el código te funcione, sólo arreglé un error de Alexs. Link to comment
lGalazArayal Posted January 13, 2015 Author Share Posted January 13, 2015 Desde el ACL.Por cierto, el responseData en caso de haber un error returna 'ERROR' no 'Error', addEventHandler("onPlayerJoin", root, function() local ip = getPlayerIP(source) fetchRemote("http://ip-api.com/json/"..ip, outputJoin, "", false, source) end) function outputJoin(response, errno, thePlayer) local country = "N/N" local city = "Desconocida" if response ~= "ERROR" and errno == 0 then local joinData = fromJSON(response) if joinData and type(joinData) == 'table' then country = joinData.country city = joinData.city end end setElementData(thePlayer,"Country", country) outputChatBox("* "..getPlayerName(thePlayer).." Ha Entrado Al Servidor Desde: ["..city.."] ["..country.."]",root,220,140,105) end Solo da la región no la ciudad * MisterZ Ha Entrado Al Servidor Desde: [] [United Kingdom] Yo ahí no fixié nada para que el código te funcione, sólo arreglé un error de Alexs. Una pregunta el permiso se le da a console el fetchremote en true? Link to comment
lGalazArayal Posted January 13, 2015 Author Share Posted January 13, 2015 Oigan ese script no esta bien acomodado no lo puedo acomodar Link to comment
Tomas Posted January 13, 2015 Share Posted January 13, 2015 El permiso se lo debes dar al ACL donde colocaste el resource, colocalo en el ACL 'Admin' y te ahorrarás ese lio. Link to comment
lGalazArayal Posted January 13, 2015 Author Share Posted January 13, 2015 El permiso se lo debes dar al ACL donde colocaste el resource, colocalo en el ACL 'Admin' y te ahorrarás ese lio. addEventHandler("onPlayerJoin", root, function() local ip = getPlayerIP(source) fetchRemote("http://ip-api.com/json/"..ip, outputJoin, "", false, source) end) function outputJoin(response, errno, thePlayer) local country = "N/N" local city = "Desconocida" if response ~= "ERROR" and errno == 0 then local joinData = fromJSON(response) if joinData and type(joinData) == 'table' then country = joinData.country city = joinData.city end end setElementData(thePlayer,"Country", country) outputChatBox("* "..getPlayerName(thePlayer).." Ha Entrado Al Servidor Desde: ["..city.."] ["..country.."]",root,220,140,105) end No lo puedo acomodar mira esta mal no puedo arreglarlo Link to comment
MisterZ Posted January 13, 2015 Share Posted January 13, 2015 no se gasten yo ya le di el permiso y sigue igual solom sale la egion Link to comment
Alexs Posted January 13, 2015 Share Posted January 13, 2015 no se gasten yo ya le di el permiso y sigue igual solom sale la egion Prueba con el código sin editar y sin ocultar tu IP, a mi me funcionó sin mayores problemas. Link to comment
Recommended Posts