Jump to content

Scoreboard Flags Country


MrXz

Recommended Posts

Posted

I was testing a script and this is what came out

Sinttulo1111.png

not leave the country with their respective flag

Script By -=I Blaawee I=-

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) 

At the end I think it has to be something like this

Sinttulo.png

Please Help :) would greatly appreciate is the

430x73.png
Posted

the Original Scoreboard can't draw images only text you need to edit the scoreboard to draw image and the script don't need admin right

Ingame Name : |DGT|Puma

DGT Clan Server 24/7 Owner/Scripter

MultiGameMode in progress :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

Posted

EDIT : mybe this will help you

Orange : we don't need your crap useless post's help or shut up and don't spam

----flag.lua

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) 

<meta> 
    <script src="flag.lua" type="server" /> 
 </meta> 

add this on line 705 (maybe you need to ad somewhere els bk your scoreboard is difrent)
elseif column.name == "Home" then 
  dxDrawImage( topX+theX, y+s(1), 16, 11, content, 0, 0, 0, cWhite, drawOverGUI ) 

Make sure to edit the scoreboard

Posted

Does not Operate I'll post again

AD:

elseif column.name == "Home" then 
  dxDrawImage( topX+theX, y+s(1), 16, 11, content, 0, 0, 0, cWhite, drawOverGUI ) 

where I have to add this code?

430x73.png
Posted
add this on line 705 (maybe you need to ad somewhere els bk your scoreboard is difrent)
elseif column.name == "Home" then 
  dxDrawImage( topX+theX, y+s(1), 16, 11, content, 0, 0, 0, cWhite, drawOverGUI ) 

Make sure to edit the scoreboard

Do you ever read what people do say ?

Edit: Woops, didn't saw earlier 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 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...