Chaos Posted July 28, 2015 Posted July 28, 2015 hey, guys what's wrong with this script it shows only flags with out countries. i need it flagimage with country exports.scoreboard:addScoreboardColumn('Home') addEventHandler("onPlayerJoin", root, function () local country = exports.admin:getPlayerCountry(source) local flag = ":admin/client/images/flags/"..country..".png" setElementData(source, "Home",{type = "image", src = flag, height = 12, width = 16} and country or "N/A") end)
GTX Posted July 28, 2015 Posted July 28, 2015 exports.scoreboard:addScoreboardColumn('Home') addEventHandler("onPlayerJoin", root, function() local country = exports.admin:getPlayerCountry(source) local flag = ":admin/client/images/flags/"..country..".png" setElementData(source, "Home", {type = "image", src = flag, height = 12, width = 16}) end ) Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS. Developer and owner of https://projectbea.st - Project Beast
Chaos Posted July 28, 2015 Author Posted July 28, 2015 it shows only flags with out countries. i need it flagimage with country
GTX Posted July 28, 2015 Posted July 28, 2015 Well, I don't think that's possible. You can try it like this: exports.scoreboard:addScoreboardColumn('Home') exports.scoreboard:addScoreboardColumn('Home2') addEventHandler("onPlayerJoin", root, function() local country = exports.admin:getPlayerCountry(source) local flag = ":admin/client/images/flags/"..country..".png" setElementData(source, "Home", {type = "image", src = flag, height = 12, width = 16}) setElementData(source, "Home2", country or "N/A") end ) Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS. Developer and owner of https://projectbea.st - Project Beast
Chaos Posted July 28, 2015 Author Posted July 28, 2015 it's possible as you can see in FFS server and others
GTX Posted July 28, 2015 Posted July 28, 2015 They're using their own scoreboard, not default. Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS. Developer and owner of https://projectbea.st - Project Beast
GTX Posted July 28, 2015 Posted July 28, 2015 You need to edit scoreboard. I told you it's not possible out of the script. Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS. Developer and owner of https://projectbea.st - Project Beast
Chaos Posted July 29, 2015 Author Posted July 29, 2015 i know only how to edit the image, would you help me? elseif column.name == "Home" then dxDrawImage( topX+theX, y+s(1), 16, 11, content, 0, 0, 0, cWhite, drawOverGUI ) else dxDrawText( content, topX+theX+s(1), y+s(1), topX+x+s(1+column.width), y+s(11)+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) dxDrawText( content, topX+theX, y, topX+x+s(column.width), y+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) end end 1
GTX Posted July 29, 2015 Posted July 29, 2015 Just add dxDrawText below dxDrawImage. Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS. Developer and owner of https://projectbea.st - Project Beast
GTX Posted July 31, 2015 Posted July 31, 2015 That's up to you. dxDrawText Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS. Developer and owner of https://projectbea.st - Project Beast
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