Jump to content

Question


luck.

Recommended Posts

first Hello, I'm new here in the forum

good, I made a script to show the country and the flag, one in each column, my question is, how can I put them both in the same column? Excuse my bad English. my code

countryNames = { 
AD="Andorra (AD)", 
AE="Emirados Arabes (EA)", 
AF="Afeganistão (AF)", 
AG="Antigua Bardura (AG)", 
....................... 
} 
  
exports.scoreboard:addScoreboardColumn('País') 
function showcountry () 
local country = exports.admin:getPlayerCountry ( source ) 
if country then 
setElementData(source,"País","".. countryNames[tostring(country)] .."") 
else 
country = "N/A"  
end 
end 
addEventHandler ( "onPlayerJoin", getRootElement(), showcountry ) 
  
exports.scoreboard:addScoreboardColumn('Flag')      
function showcountry () 
local flag = exports.admin:getPlayerCountry ( source ) 
if flag then 
setElementData(source,"Flag",":admin/client/images/flags/"..flag..".png") 
else 
flag = "N/A"  
end 
end 
addEventHandler ( "onPlayerJoin", getRootElement(), showcountry ) 

Edited by Guest
Link to comment
Someone else already asked for this, and I helped him, search the forums for the topic.

Sorry, I did it anymore and just think cases of requests to put the country and the flag, more like put both in one column I have not found '--'

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