local countryNames = {
["AD"] = "Andorra",
["AG"] = "Antigua - Barbuda",
["AI"] = "Anguilla Arabia",
["AL"] = "Albania",
["AM"] = "Armenia",
["AR"] = "Argentina",
["AT"] = "Austria",
["AU"] = "Australia",
["AW"] = "Aruba",
["BA"] = "Bosnia",
["BE"] = "Belgium",
["BG"] = "Bulgaria",
["BH"] = "Bahrain",
["BM"] = "Bermuda",
["BN"] = "Bronei ",
["BO"] = "Bolivia",
["BR"] = "Brazil",
["BS"] = "Bahamas",
["BW"] = "Botswana",
["BY"] = "Belarus",
["BZ"] = "Belize",
["CA"] = "Canada",
["CC"] = "Cocos",
["CH"] = "Switzerland",
["CI"] = "Ivory Coast",
["CL"] = "Chile",
["CN"] = "China",
["CO"] = "Colombia",
["CU"] = "Cuba",
["CY"] = "Cyprus",
["CZ"] = "Czech",
["DE"] = "Germany",
["DK"] = "Denmark",
["DM"] = "Dominica",
["DO"] = "Dominican",
["EC"] = "Ecuador",
["EE"] = "Estonia",
["EG"] = "Egypt",
["ES"] = "Spain",
["ET"] = "Ethiopia",
["FI"] = "Finland",
["FR"] = "France",
["GB"] = "Great-Britain",
["GL"] = "Greenland",
["GY"] = "Guyana",
["HR"] = "Croatia",
["HU"] = "Hungary",
["ID"] = "Indonesia",
["IE"] = "Ireland",
["IR"] = "Iran",
["IS"] = "Iceland",
["IT"] = "Italy",
["IN"] = "India",
["JO"] = "Jordan",
["JM"] = "Jamaica",
["jp"] = "Mexico",
["KW"] = "Kuwait",
["IT"] = "Italy",
["LU"] = "Luxembourg",
["LV"] = "Latvia",
["MA"] = "Morocco",
["MC"] = "Monaco",
["MT"] = "Malta",
["MX"] = "Mexico",
["NG"] = "Nigeria",
["NL"] = "Netherlands",
["NO"] = "Norway",
["PA"] = "Panama",
["PE"] = "Peru",
["PH"] = "Philipines",
["PK"] = "Pakistan",
["PL"] = "Poland",
["PT"] = "Portugal",
["QA"] = "Qatar",
["RO"] = "Romania",
["RU"] = "Russia",
["SA"] = "Saudi Arbia",
["SE"] = "Sweden",
["SI"] = "Slovania",
["TO"] = "Tonga",
["TR"] = "Turkey",
["UA"] = "Ukraine",
["UK"] = "United Kingdom",
["US"] = "United States",
["UY"] = "Uruguay",
["VN"] = "Vietnam",
["YE"] = "Yemen",
["YU"] = "Yugoslavia",
["ZA"] = "South Africa"
};
addEventHandler ( 'onPlayerJoin', root,
function ( )
local country = exports [ 'admin' ]:getPlayerCountry ( source );
country = countryNames or 'N/A'
setElementData ( source, 'Country', country );
outputChatBox ( getPlayerName ( source ) .. ' has joined the game from ' .. tostring( getElementData ( source, 'Country' ) ), root, 255, 100, 100, false );
end
);
I try this and now write:
PlayerName has joined the game from table: and number