Jump to content

scoreboard flag img


Blaawee

Recommended Posts

Posted

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.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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

Posted

Tabel={

["IT"]={"Italy"},

["MX"]={"Mexico"}

}

country=unpack(Tabel[flag])

Ingame Name : |DGT|Puma

DGT Clan Server 24/7 Owner/Scripter

MultiGameMode in progress :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

Posted

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]

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

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You're welcome ;).

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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