//_Dragon Posted November 8, 2015 Share Posted November 8, 2015 http://imgur.com/G5KAbBd Guys i want add picture's level & number's level in scoreboard here are the script server : exports.scoreboard:addScoreboardColumn("Level",getRootElement(),1,40,'Level') function scoreLevel () local account = getPlayerAccount(source) local Level = getElementData(source,"Level") or 0 if isGuestAccount ( account ) then setElementData(source, "Level",":Experience/Emblems/Guest.png") else setElementData(source, "Level", ":Experience/Emblems/"..tostring(Level)..".png" ) end end addEventHandler("onPlayerSpawn", getRootElement(), scoreLevel) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),function() call(getResourceFromName("scoreboard"),"addScoreboardColumn","Level", getRootElement(), 1, 40) end ) Link to comment
Addlibs Posted November 8, 2015 Share Posted November 8, 2015 Set element data of the player, lets say, 'level_icon', to { ["type"] = "image", ["src"] = ":resource/file.ext", ["color"] = tocolor(255,255,255,255), ["width"] = 20, ["height"] = 20, } , then add a column to show level_icon element data under an unnamed column: exports.scoreboard:addScoreboardColumn("level_icon",getRootElement(),1,40," ") --Last argument, friendly name, is just a space in a string. 1 Link to comment
DarkByte Posted November 8, 2015 Share Posted November 8, 2015 He need full working code. He cant understand. Link to comment
//_Dragon Posted November 8, 2015 Author Share Posted November 8, 2015 MrTasty Not Working can u put that's code in server ↓↓ exports.scoreboard:addScoreboardColumn("Level",getRootElement(),1,40,'Level') function scoreLevel () local account = getPlayerAccount(source) local Level = getElementData(source,"Level") or 0 if isGuestAccount ( account ) then setElementData(source, "Level",":Experience/Emblems/Guest.png") else setElementData(source, "Level", ":Experience/Emblems/"..tostring(Level)..".png" ) end end addEventHandler("onPlayerSpawn", getRootElement(), scoreLevel) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),function() call(getResourceFromName("scoreboard"),"addScoreboardColumn","Level", getRootElement(), 1, 40) end ) Link to comment
1LoL1 Posted November 9, 2015 Share Posted November 9, 2015 MrTasty Not Working can u put that's code in server ↓↓ exports.scoreboard:addScoreboardColumn("Level",getRootElement(),1,40,'Level') function scoreLevel () local account = getPlayerAccount(source) local Level = getElementData(source,"Level") or 0 if isGuestAccount ( account ) then setElementData(source, "Level",":Experience/Emblems/Guest.png") else setElementData(source, "Level", ":Experience/Emblems/"..tostring(Level)..".png" ) end end addEventHandler("onPlayerSpawn", getRootElement(), scoreLevel) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),function() call(getResourceFromName("scoreboard"),"addScoreboardColumn","Level", getRootElement(), 1, 40) end ) Use tag. Link to comment
//_Dragon Posted November 9, 2015 Author Share Posted November 9, 2015 MrTasty Not Working can u put that's code in server ↓↓ exports.scoreboard:addScoreboardColumn("Level",getRootElement(),1,40,'Level') function scoreLevel () local account = getPlayerAccount(source) local Level = getElementData(source,"Level") or 0 if isGuestAccount ( account ) then setElementData(source, "Level",":Experience/Emblems/Guest.png") else setElementData(source, "Level", ":Experience/Emblems/"..tostring(Level)..".png" ) end end addEventHandler("onPlayerSpawn", getRootElement(), scoreLevel) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),function() call(getResourceFromName("scoreboard"),"addScoreboardColumn","Level", getRootElement(), 1, 40) end ) Use tag. You mean : server.lua !? Link to comment
//_Dragon Posted November 9, 2015 Author Share Posted November 9, 2015 The problem is : no picture's level is drawing in scoreboard i hope someone help me Link to comment
DarkByte Posted November 9, 2015 Share Posted November 9, 2015 Dont waste time with this dumb ass Link to comment
1LoL1 Posted November 9, 2015 Share Posted November 9, 2015 Try this: exports.scoreboard:addScoreboardColumn ( "Level", getRootElement(), 9, 0.07 ) function scoreLevel () local account = getPlayerAccount(source) local Level = getElementData(source,"Level") or 0 if isGuestAccount ( account ) then setElementData(source, "Level",":Experience/Emblems/Guest.png") else local test = ":Experience/Emblems/"..tostring(Level)..".png" setElementData(source, "Level", test and {type = "image", src = test, height = 12, width = 16} or "N/A") end end addEventHandler("onPlayerSpawn", getRootElement(), scoreLevel) Link to comment
//_Dragon Posted November 9, 2015 Author Share Posted November 9, 2015 Try this: exports.scoreboard:addScoreboardColumn ( "Level", getRootElement(), 9, 0.07 ) function scoreLevel () local account = getPlayerAccount(source) local Level = getElementData(source,"Level") or 0 if isGuestAccount ( account ) then setElementData(source, "Level",":Experience/Emblems/Guest.png") else local test = ":Experience/Emblems/"..tostring(Level)..".png" setElementData(source, "Level", test and {type = "image", src = test, height = 12, width = 16} or "N/A") end end addEventHandler("onPlayerSpawn", getRootElement(), scoreLevel) http://imgur.com/v82uwBZ | Not Working Any one help ? Link to comment
1LoL1 Posted November 10, 2015 Share Posted November 10, 2015 Why are you doing this off the topic? Link to comment
GTX Posted November 10, 2015 Share Posted November 10, 2015 Hmm, as far as I know, you must edit scoreboard itself? Link to comment
//_Dragon Posted November 12, 2015 Author Share Posted November 12, 2015 Hmm, as far as I know, you must edit scoreboard itself? maybe ? Link to comment
HunT Posted November 12, 2015 Share Posted November 12, 2015 1: Go to scoreboard resource 2: Open with NotePad dxscoreboard_client.lua 3: Add this + or - on 700 line ( check the image ) elseif column.name == "Level" then dxDrawImage( topX+theX, y-s(0.5), 30, 30, content, 0, 0, 0, cWhite, drawOverGUI ) 4: Example from my old scoreboard Full image : http://i.imgur.com/28dziCE.png Link to comment
Addlibs Posted November 12, 2015 Share Posted November 12, 2015 Hmm, as far as I know, you must edit scoreboard itself? Actually, my code should work with the unmodified version of scoreboard (or more technically, dxscoreboard) - it is based on an extract from the voice resource which displays an icon on the scoreboard depending on the voice-state of a player (speaking, not speaking, muted) on the default scoreboard resource 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