Jump to content

Question


WASSIm.

Recommended Posts

Posted

No errors on debug?

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

Replace the script with this :

--[ Scoreboard flag   ]-- 
--[ by 3aSH8_aLsHrq   ]-- 
--[ [email protected] ]-- 
  
  
exports.scoreboard:addScoreboardColumn( "Home" ) 
  
function showcountry( source ) 
    local flag = exports.admin:getPlayerCountry( source ) or "N/A" 
    if not flag or flag == "N/A" then 
        setElementData( source, "Home", "N/A" ) 
    else 
        setElementData( source, "Home", ":admin/client/images/flags/".. flag .. ".png" ) 
    end 
end 
  
addEventHandler( "onResourceStart", resourceRoot,  
    function( ) 
        for k,v in ipairs( getElementsByType( "player" ) ) do 
            showcountry( v ) 
        end 
    end 
) 
addEventHandler( "onPlayerJoin", root, showcountry ) 

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

Posted (edited)

thx i need this

is show me N/A and level working :/

exports["scoreboard"]:scoreboardAddColumn ( "Ranks", root, 20, "R", 1) 
  
function showranks( source ) 
    local r = getElementData(source,"level") 
    if not r then 
        setElementData( source, "Ranks", "N/A" ) 
    else 
        setElementData(source,"Ranks","ranks/lvl_"..r..".png") 
    end 
end 
  
addEventHandler( "onResourceStart", resourceRoot, 
    function( ) 
        for k,v in ipairs( getElementsByType( "player" ) ) do 
            showranks( v ) 
        end 
    end 
) 
addEventHandler( "onPlayerJoin", root, showranks ) 

Edited by Guest

Omerta Roleplay

Posted

Means that "r" is returning false or nil.

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

That error appears when you login? if so, then the problem is that 'source' is not a player element.

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
That error appears when you login? if so, then the problem is that 'source' is not a player element.

i change some think but is show me (ranks)

exports["scoreboard"]:scoreboardAddColumn ( "Ranks", root, 20, "R", 1) 
  
function showranks( ) 
    for index, player in ipairs ( getElementsByType "player" ) do 
        local r = getElementData(player,"level") 
        if not r then 
            setElementData( player, "Ranks", r ) 
        else 
            setElementData( player,"Ranks","ranks/lvl_"..r..".png") 
        end 
    end 
end 
setTimer ( showranks, 500, 0 ) 

Omerta Roleplay

Posted

I don't understand what do you mean.

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

Does it show or not?

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

Post the edited scoreboard code.

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

Well... post it? because that's for country, not ranks.

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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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