Jump to content

como hago una columna en scoreboard


iFoReX

Recommended Posts

Posted
setElementData 

Recuerda que necesitas agregar el recurso al ACL.xml para darle permiso a la funcion getPlayerIP.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
exports [ "scoreboard" ]:scoreboardAddColumn ( "IP" ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

430x73_FFFFFF_FF9900_000000_000000.png
Posted

No entiendo que queres hacer.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
exports [ "scoremota" ]:scoreboardAddColumn ( "ip" ) 
  
function IP() 
ip = getPlayerIP ( source ) 
setElementData ( source, "ip", ip ) 
   end 
end 
addEventHandler ( "onPlayerJoin", getRootElement(), IP ) 

Intenta asi...

Developer @ MYVAL

Posted

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.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

De nada.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...