roaddog Posted April 20, 2014 Posted April 20, 2014 Hi, again now Im going to add coloumn in scoreboard. How can I modify the width if I use exports function ? exports.scoreboard:addScoreboardColumn('Home') function showcountry() local flag = exports.admin:getPlayerCountry ( source ) if flag then setElementData(source,"Home",":admin/client/images/flags/"..flag..".png") else flag = "N/A" end end addEventHandler("onPlayerJoin",getRootElement(),showcountry) and how can I place the Home column right next to name? Thank you.
justn Posted April 20, 2014 Posted April 20, 2014 To modify the width, did you read mta wiki? Note: this is for addScoreboardColumn name: The column name (also the element data name used to get information from). forElement: The player to who the column should be added for. width: Width of the column in pixels. friendlyName: Friendly name (displayed in the scoreboard) of the column. priority: The priority slot of the column (1-500). If slot isn't free, the column in that slot will be pushed forward.
roaddog Posted April 20, 2014 Author Posted April 20, 2014 Like this ? sorry I have been learning since a week ago scoreboardAddColumn ( "home", 40, "Home" )
roaddog Posted April 20, 2014 Author Posted April 20, 2014 Anyone help me please here's the code exports["scoreboard"]:addScoreboardColumn( "Home", getRootElement() , 20, "Home", 1 ) exports["scoreboard"]:addScoreboardColumn("Country",getRootElement() , 100, "Country", 3 )
Karuzo Posted April 20, 2014 Posted April 20, 2014 priority: The priority slot of the column (1-500). If slot isn't free, the column in that slot will be pushed forward.
roaddog Posted April 20, 2014 Author Posted April 20, 2014 Oh I know now it should be like this just tried and tried exports["scoreboard"]:addScoreboardColumn( "Home", getRootElement() , 1, 20, "Home") Thanks both of ya
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