Jump to content

Country flags in dxscoreboard?


Admigo

Recommended Posts

Posted

Heey all,

I saw that you can add flags from your country in dxscoreboard.

But i dont know how.

Can anyone give me the code pls?

Thanks Admigo

Posted

yeah it's

Server Side :

exports.scoreboard:addScoreboardColumn('Country') -- add a column called ('Country') 
function showFlag () 
local Home = call(getResourceFromName("admin"), "getPlayerCountry", source) -- then we get the country name from the admin panel  
    setElementData(source,"Country",Home) -- then exported to the column  
end 
addEventHandler("onPlayerJoin",getRootElement(),showFlag) 

Posted
yeah it's

Server Side :

exports.scoreboard:addScoreboardColumn('Country') -- add a column called ('Country') 
function showFlag () 
local Home = call(getResourceFromName("admin"), "getPlayerCountry", source) -- then we get the country name from the admin panel  
    setElementData(source,"Country",Home) -- then exported to the column  
end 
addEventHandler("onPlayerJoin",getRootElement(),showFlag) 

Benx said, "NOBODY WILL".

Posted

well, he did...

people have option to help or give, Ben said that "Nobody Will" because really no one would give out a code/script for free, but people like me and him would help.

Posted
yeah it's

Server Side :

exports.scoreboard:addScoreboardColumn('Country') -- add a column called ('Country') 
function showFlag () 
local Home = call(getResourceFromName("admin"), "getPlayerCountry", source) -- then we get the country name from the admin panel  
    setElementData(source,"Country",Home) -- then exported to the column  
end 
addEventHandler("onPlayerJoin",getRootElement(),showFlag) 

Thanks Dude,but its not working,Its adding a country collum buy when i login or not logged in nothings shows in the collum.

Posted

Use the admin resource to return the player's country code, and store it as element data to the player. Then, clientside (on all clients), draw the players country next to his/her name in the scoreboard. To do this, you need to copy over all the flags from the admin resource to the dxscoreboard resource, set up tables to determine which flag to use / the actual name of the country, and modify the rendering code of the scoreboard to draw the actual flag.

Simple as that.

Posted
Use the admin resource to return the player's country code, and store it as element data to the player. Then, clientside (on all clients), draw the players country next to his/her name in the scoreboard. To do this, you need to copy over all the flags from the admin resource to the dxscoreboard resource, set up tables to determine which flag to use / the actual name of the country, and modify the rendering code of the scoreboard to draw the actual flag.

Simple as that.

U call it simple:P

I am so noob in scripting mta.

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