Jump to content

scoreboard


RenanPG

Recommended Posts

I want to put Coutry and Flag on the same column of the scoreboard, below the code, i tested, but it wasn't worked and stayed in blank.

     exports.scoreboard:addScoreboardColumn('Home', getRootElement(), 1, 0.024) 
            function showcountry() 
            local flag = exports.admin:getPlayerCountry ( source ) 
                     if flag then 
                     setElementData(source,"Home",":admin/client/images/flags/"..flag..".png") 
                     else 
                     setElementData(source,"Home",":admin/client/images/flags/eu.png") 
                     end 
             end 
     addEventHandler("onPlayerJoin",getRootElement(),showcountry) 
      
         exports.scoreboard:addScoreboardColumn('Country', getRootElement(), 2, 0.024) 
      
            function showcountry() 
            local pais = exports.admin:getPlayerCountry ( source ) 
                     if flag then 
                     setElementData(source,"Country", "..pais..") 
                     else 
                     pais = "N/A"  
                     end 
             end 
     addEventHandler("onPlayerJoin",getRootElement(),showcountry) 

and how can i put the name column in blank (with no name)?

Link to comment

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...