Castillo Posted January 3, 2012 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 San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Blaawee Posted January 3, 2012 Author 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
bandi94 Posted January 3, 2012 Posted January 3, 2012 Tabel={ ["IT"]={"Italy"}, ["MX"]={"Mexico"} } country=unpack(Tabel[flag]) Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
Blaawee Posted January 3, 2012 Author 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]
Castillo Posted January 3, 2012 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) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted January 4, 2012 Posted January 4, 2012 You're welcome . San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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