Castillo Posted January 3, 2012 Share Posted January 3, 2012 You've joined via your local IP? if so, the script can't get the country from it, because it's local. If it's hamachi, it's the same thing. Try joining from your GLOBAL IP, you can know it via: http://whatismyip.com Link to comment
Blaawee Posted January 3, 2012 Author Share Posted January 3, 2012 For names u can made the table with :IT = "Italy" MX = "Mexico" . . .etc and call the name country with event onPlayerJoin type outputChatBox getPlayerName(source) + name table can you show an example Link to comment
bandi94 Posted January 3, 2012 Share Posted January 3, 2012 Tabel={ ["IT"]={"Italy"}, ["MX"]={"Mexico"} } country=unpack(Tabel[flag]) Link to comment
Blaawee Posted January 3, 2012 Author Share Posted January 3, 2012 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
Castillo Posted January 3, 2012 Share Posted January 3, 2012 ----------------------- --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
Blaawee Posted January 4, 2012 Author Share Posted January 4, 2012 thx Solid Thats working 100% Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now