Castillo Posted July 31, 2013 Share Posted July 31, 2013 So what? is for that script, it doesn't add the image support. Link to comment
WASSIm. Posted July 31, 2013 Author Share Posted July 31, 2013 So what? is for that script, it doesn't add the image support. you know how make images ranks in scoreboard plis Link to comment
Castillo Posted July 31, 2013 Share Posted July 31, 2013 Same way that country column is made, study the script and do the same. Link to comment
WASSIm. Posted July 31, 2013 Author Share Posted July 31, 2013 Same way that country column is made, study the script and do the same. il get it and i replace this elseif column.name == "Home" then dxDrawImage( topX+theX, y+s(1), 16, 11, content, 0, 0, 0, cWhite, drawOverGUI ) to this elseif column.name == "Ranks" then dxDrawImage( topX+theX, y+s(1), 16, 11, content, 0, 0, 0, cWhite, drawOverGUI ) but is dont show everythink Link to comment
Castillo Posted July 31, 2013 Share Posted July 31, 2013 What do you mean by "everything"? Link to comment
WASSIm. Posted July 31, 2013 Author Share Posted July 31, 2013 What do you mean by "everything"? no image no "N/A" and debug: 705:Bad usage @ 'dxDrawImage' [Can't load file] Link to comment
Castillo Posted July 31, 2013 Share Posted July 31, 2013 exports["scoreboard"]:scoreboardAddColumn ( "Ranks", root, 20, "R", 1) function showranks( ) for index, player in ipairs ( getElementsByType "player" ) do local r = getElementData(player,"level") if not r then setElementData( player, "Ranks", r ) else setElementData( player,"Ranks",":ranks/lvl_"..r..".png") end end end setTimer ( showranks, 500, 0 ) Link to comment
WASSIm. Posted July 31, 2013 Author Share Posted July 31, 2013 exports["scoreboard"]:scoreboardAddColumn ( "Ranks", root, 20, "R", 1) function showranks( ) for index, player in ipairs ( getElementsByType "player" ) do local r = getElementData(player,"level") if not r then setElementData( player, "Ranks", r ) else setElementData( player,"Ranks",":ranks/lvl_"..r..".png") end end end setTimer ( showranks, 500, 0 ) images is in same resource Link to comment
Castillo Posted July 31, 2013 Share Posted July 31, 2013 Is it on the scoreboard resource? Link to comment
WASSIm. Posted July 31, 2013 Author Share Posted July 31, 2013 Is it on the scoreboard resource? no Link to comment
Castillo Posted July 31, 2013 Share Posted July 31, 2013 Then is not on the same resource. Also, if "ranks" isn't the resource name but the folder where ranks are located, then you must include resource name. Link to comment
WASSIm. Posted July 31, 2013 Author Share Posted July 31, 2013 Then is not on the same resource. its same resource look > ="ranks.lua" type="server"/> src="ranks/lvl_0.png" /> src="ranks/lvl_1.png" /> src="ranks/lvl_2.png" /> src="ranks/lvl_3.png" /> src="ranks/lvl_4.png" /> src="ranks/lvl_5.png" /> src="ranks/lvl_6.png" /> src="ranks/lvl_7.png" /> src="ranks/lvl_8.png" /> src="ranks/lvl_9.png" /> src="ranks/lvl_10.png" />> Link to comment
Castillo Posted July 31, 2013 Share Posted July 31, 2013 Before "ranks" in setElementData put the resource name, like this: ":resourceName/ranks/etc" Link to comment
WASSIm. Posted July 31, 2013 Author Share Posted July 31, 2013 Before "ranks" in setElementData put the resource name, like this:":resourceName/ranks/etc" i make it but nothing Link to comment
WASSIm. Posted July 31, 2013 Author Share Posted July 31, 2013 Show me new code. idk why image is same resource and put name resource ! exports["dxscoreboard"]:scoreboardAddColumn ( "Ranks", root, 20, "R", 1) function showranks( ) for index, player in ipairs ( getElementsByType "player" ) do local r = getElementData(player,"level") if not r then setElementData( player, "Ranks", r ) else setElementData( player, "Ranks","(IV)ranks:ranks/lvl_"..r..".png") end end end setTimer ( showranks, 500, 0 ) Link to comment
Castillo Posted July 31, 2013 Share Posted July 31, 2013 You obviously didn't read my last post. exports["dxscoreboard"]:scoreboardAddColumn ( "Ranks", root, 20, "R", 1) function showranks( ) for index, player in ipairs ( getElementsByType "player" ) do local r = getElementData(player,"level") if not r then setElementData( player, "Ranks", r ) else setElementData( player, "Ranks",":(IV)ranks/ranks/lvl_"..r..".png") end end end setTimer ( showranks, 500, 0 ) Link to comment
-.Paradox.- Posted July 31, 2013 Share Posted July 31, 2013 Post rank.lua maybe there is a bug in. Link to comment
WASSIm. Posted July 31, 2013 Author Share Posted July 31, 2013 Post rank.lua maybe there is a bug in. exports["dxscoreboard"]:scoreboardAddColumn ( "Ranks", root, 20, "R", 1) function showranks( ) for index, player in ipairs ( getElementsByType "player" ) do local r = getElementData(player,"level") if not r then setElementData( player, "Ranks", r ) else setElementData( player, "Ranks",":(IV)ranks/ranks/lvl_"..r..".png") end end end setTimer ( showranks, 500, 0 ) Link to comment
Castillo Posted July 31, 2013 Share Posted July 31, 2013 elseif column.name == "Ranks" then outputChatBox ( tostring ( content ) ) dxDrawImage( topX+theX, y+s(1), 16, 11, content, 0, 0, 0, cWhite, drawOverGUI ) Try that and see what it outputs to chatbox when you open the scoreboard. Link to comment
-.Paradox.- Posted August 7, 2013 Share Posted August 7, 2013 dxscoreboard_client.lua after : xPos = xPos + textLength (string 692) elseif column.name == "Ranks" then dxDrawImage( topX+theX, y-s(0.5), 30, 30, content, 0, 0, 0, cWhite, drawOverGUI ) Link to comment
WASSIm. Posted August 7, 2013 Author Share Posted August 7, 2013 dxscoreboard_client.lua after : xPos = xPos + textLength (string 692) nothing ERROR: ranks.lua:7: attempt to concatenate local 'r' (a boolean value) Link to comment
-.Paradox.- Posted August 7, 2013 Share Posted August 7, 2013 That exactly what happened to me, try this if dont work try reconnect. exports["dxscoreboard"]:scoreboardAddColumn ( "Ranks", root, 20, "Ranks", 1) function showranks( ) for index, player in ipairs ( getElementsByType "player" ) do local r = getElementData(player,"level") if not r then setElementData( player, "Ranks", r ) else setElementData(source, "Ranks", tostring(":(IV)ranks/ranks/lvl_"..r..".png" )) end end end setTimer ( showranks, 500, 0 ) Link to comment
-.Paradox.- Posted August 7, 2013 Share Posted August 7, 2013 EDIT : srry i saw another mistake exports["dxscoreboard"]:scoreboardAddColumn ( "Ranks", root, 20, "Ranks", 1) function showranks( ) for index, player in ipairs ( getElementsByType "player" ) do local r = getElementData(player,"level") if not r then setElementData(source, "Ranks",":(IV)ranks/ranks/lvl_0.png") else setElementData(source, "Ranks", tostring(":(IV)ranks/ranks/lvl_"..r..".png" )) end end end setTimer ( showranks, 500, 0 ) Link to comment
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