Castillo Posted July 31, 2013 Posted July 31, 2013 So what? is for that script, it doesn't add the image support.
WASSIm. Posted July 31, 2013 Author 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
Castillo Posted July 31, 2013 Posted July 31, 2013 Same way that country column is made, study the script and do the same.
WASSIm. Posted July 31, 2013 Author 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
WASSIm. Posted July 31, 2013 Author 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]
Castillo Posted July 31, 2013 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 )
WASSIm. Posted July 31, 2013 Author 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
Castillo Posted July 31, 2013 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.
WASSIm. Posted July 31, 2013 Author 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" />>
Castillo Posted July 31, 2013 Posted July 31, 2013 Before "ranks" in setElementData put the resource name, like this: ":resourceName/ranks/etc"
WASSIm. Posted July 31, 2013 Author Posted July 31, 2013 Before "ranks" in setElementData put the resource name, like this:":resourceName/ranks/etc" i make it but nothing
WASSIm. Posted July 31, 2013 Author 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 )
Castillo Posted July 31, 2013 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 )
WASSIm. Posted July 31, 2013 Author 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 )
Castillo Posted July 31, 2013 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.
-.Paradox.- Posted August 7, 2013 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 )
WASSIm. Posted August 7, 2013 Author 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)
-.Paradox.- Posted August 7, 2013 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 )
-.Paradox.- Posted August 7, 2013 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 )
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