iFoReX Posted May 19, 2012 Posted May 19, 2012 ? como la hago se q con esta funcion getPlayerIP pero con que mas ? elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Castillo Posted May 19, 2012 Posted May 19, 2012 setElementData Recuerda que necesitas agregar el recurso al ACL.xml para darle permiso a la funcion getPlayerIP. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iFoReX Posted May 19, 2012 Author Posted May 19, 2012 ok eso, y como se hacia eso para exportar la columna ? elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Castillo Posted May 19, 2012 Posted May 19, 2012 exports [ "scoreboard" ]:scoreboardAddColumn ( "IP" ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iFoReX Posted May 19, 2012 Author Posted May 19, 2012 Que esta mal ? exports [ "scoremota" ]:scoreboardAddColumn ( "ip" ) function IP() local account = getPlayerAccount(source) if isGuestAccount(account) then return end local ip = getAccountData(account,"ip") if not ip then setAccountData(account,"ip",Cargando) end setAccountData(account,"ip",tonumber(getPlayerIP(source))) end addEventHandler("onPlayerLogin",root, function () local account = getPlayerAccount(source) if isGuestAccount(account) then return end local ip = getAccountData(account,"ip") if ip then setElementData(source,"ip",tostring(getPlayerIP(source))) else setElementData(source,"ip",Cargando) end end) no me aparece nada en la columna elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Castillo Posted May 19, 2012 Posted May 19, 2012 No entiendo que queres hacer. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Alexs Posted May 19, 2012 Posted May 19, 2012 exports [ "scoremota" ]:scoreboardAddColumn ( "ip" ) function IP() ip = getPlayerIP ( source ) setElementData ( source, "ip", ip ) end end addEventHandler ( "onPlayerJoin", getRootElement(), IP ) Intenta asi... Developer @ MYVAL
iFoReX Posted May 19, 2012 Author Posted May 19, 2012 Quiero que la IP se ponga en el tab , no funciona alexs elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Castillo Posted May 19, 2012 Posted May 19, 2012 Entonces que tiene quever las funciones de cuenta con eso?? addEventHandler ( "onResourceStart", resourceRoot, function ( ) exports [ "scoremota" ]:scoreboardAddColumn ( "ip" ) for index, player in ipairs ( getElementsByType ( "player" ) ) do setElementData ( player, "ip", getPlayerIP ( player ) ) end end ) addEventHandler ( "onPlayerJoin", root, function ( ) setElementData ( source, "ip", getPlayerIP ( source ) ) end ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iFoReX Posted May 19, 2012 Author Posted May 19, 2012 Muuuchas gracias solid es que era mi primera vez haciendo un script de scoreboard elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Castillo Posted May 19, 2012 Posted May 19, 2012 De nada. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts