iFoReX Posted May 19, 2012 Posted May 19, 2012 ? como la hago se q con esta funcion getPlayerIP pero con que mas ?
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.
iFoReX Posted May 19, 2012 Author Posted May 19, 2012 ok eso, y como se hacia eso para exportar la columna ?
Castillo Posted May 19, 2012 Posted May 19, 2012 exports [ "scoreboard" ]:scoreboardAddColumn ( "IP" )
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
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...
iFoReX Posted May 19, 2012 Author Posted May 19, 2012 Quiero que la IP se ponga en el tab , no funciona alexs
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 )
iFoReX Posted May 19, 2012 Author Posted May 19, 2012 Muuuchas gracias solid es que era mi primera vez haciendo un script de scoreboard
Recommended Posts