Jump to content

scoreboard country flag


-stolka-

Recommended Posts

i downloaded this script but it doesn't work... it outputs the string of the directory insted the flag image

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

Link to comment

it doesn't work :(

     exports.scoreboard:addScoreboardColumn('Country') 
      
            function showcountry() 
            local flag = exports.admin:getPlayerCountry ( source ) 
                     if flag then 
                     setElementData( source,"Country",{type="image", src="./admin/client/images/flags/"..flag..".png", width=30, height=20} ) 
                     else 
                     flag = "N/A"  
                     end 
             end 
     addEventHandler("onPlayerJoin",getRootElement(),showcountry) 

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