RenanPG Posted February 18, 2014 Posted February 18, 2014 Hi folks, i want to create a Flag system, someone can help me? CODE: exports.scoreboard:addScoreboardColumn ( 'Home' ) function showcountry ( ) local flag = exports.admin:getPlayerCountry ( source ) or "US" setElementData ( source, "Home", { ":admin/client/images/flags/".. flag ..".png", flag } ) end addEventHandler ( "onPlayerJoin", root, showcountry ) addEventHandler ( "onPlayerChat", root, showcountry ) and i setted this on scoreboard: elseif column.name == "Home" then dxDrawImage( topX+theX, y+s(1), 16, 11, content [ 1 ], 0, 0, 0, cWhite, drawOverGUI ) dxDrawText ( tostring ( content [ 2 ] ), topX+theX + 5, y+s(1), 16, 11, cWhite, 1, "default", "right", "bottom", true, false, drawOverGUI ) The flags is ok, but don't show the country. i want something like this:
Castillo Posted February 18, 2014 Posted February 18, 2014 I can't see the images you posted, upload them somewhere else. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted February 18, 2014 Posted February 18, 2014 I can't seem them either, upload them to another site, not the same one. Try this one: http://imgur.com/ San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
MTA Team 0xCiBeR Posted February 18, 2014 MTA Team Posted February 18, 2014 Maybe this will help? viewtopic.php?f=91&t=52867&start=30 DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
RenanPG Posted February 18, 2014 Author Posted February 18, 2014 I copied the code used on scoreboard of this topics: viewtopic.php?f=91&t=52867&start=30 . But still dont working.
Moderators Citizen Posted February 20, 2014 Moderators Posted February 20, 2014 ("Uping" this thread as requested in a PM) I need to see the line where the content variable is defined (I'm pretty sure it's a getElementData on "Home" but still want to be sure). The rEvolution is coming ...
Wei Posted February 21, 2014 Posted February 21, 2014 If you still need: exports.scoreboard:addScoreboardColumn ( 'Home' ) function showcountry ( ) local flag = exports.admin:getPlayerCountry ( source ) or "US" setElementData ( source, "Home", flag) end addEventHandler ( "onPlayerJoin", root, showcountry ) addEventHandler ( "onPlayerChat", root, showcountry ) elseif column.name == "Home" then dxDrawImage( topX+theX, y+s(1), 16, 11, ":admin/client/images/flags/"..content..".png", 0, 0, 0, cWhite, drawOverGUI ) dxDrawText( string.upper(content), topX+theX+23, 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 ) that should work Diet with russian vodka, lose 3 days in one week !
RenanPG Posted February 27, 2014 Author Posted February 27, 2014 If you still need: exports.scoreboard:addScoreboardColumn ( 'Home' ) function showcountry ( ) local flag = exports.admin:getPlayerCountry ( source ) or "US" setElementData ( source, "Home", flag) end addEventHandler ( "onPlayerJoin", root, showcountry ) addEventHandler ( "onPlayerChat", root, showcountry ) elseif column.name == "Home" then dxDrawImage( topX+theX, y+s(1), 16, 11, ":admin/client/images/flags/"..content..".png", 0, 0, 0, cWhite, drawOverGUI ) dxDrawText( string.upper(content), topX+theX+23, 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 ) that should work Thank you, i'll try it.
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