Jump to content

Flags


Chaos

Recommended Posts

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) 

Link to comment
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 
) 

Link to comment

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 
) 

Link to comment

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 

  • Like 1
Link to comment

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