Jump to content

scoreboard flag img


Blaawee

Recommended Posts

you mean like this :

----------------------- 
--Show Country 
----------------------- 
  
exports.scoreboard:addScoreboardColumn('Country') 
  
Tabel={ 
["IT"]={"Italy"}, 
["MX"]={"Mexico"}, 
["SA"]={"SAUDI ARBIA"}, 
["EG"]={"EGYPT"} 
} 
  
  
function showHome () 
local Home = unpack(Tabel[flag]) 
    setElementData(source,"Country",Home) 
end 
addEventHandler("onPlayerJoin",getRootElement(),showHome) 

and how make it work the outChatBox like this

Blaawee has joined the game , and he is from [his county]

Link to comment
----------------------- 
--Show Country 
----------------------- 
  
exports.scoreboard:addScoreboardColumn('Country') 
  
countryNames = { 
    ["IT"]="Italy", 
    ["MX"]="Mexico", 
    ["SA"]="SAUDI ARBIA", 
    ["EG"]="EGYPT" 
} 
  
  
function showHome () 
    local countryCode = exports["admin"]:getPlayerCountry(source) 
    setElementData(source,"Country",countryNames[countryCode]) 
    outputChatBox(getPlayerName(source) .." has joined from ".. tostring(countryNames[countryCode]) ..".",getRootElement(),0,255,0) 
end 
addEventHandler("onPlayerJoin",getRootElement(),showHome) 

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