BorderLine Posted September 3, 2012 Share Posted September 3, 2012 Hi everyone. well im trying to draw a rank img in scoreboard but i have problems this are my codes scoreboard edit.. clientside elseif column.name == "Pais" then dxDrawImage( topX+theX, y+s(1), 17, 12, content, 0, 0, 0, cWhite, drawOverGUI ) elseif column.name == "Medalla" then dxDrawImage( topX+theX, y+s(1), 40, 40, content, 0, 0, 0, cWhite, drawOverGUI ) else dxDrawText( content, topX+theX+s(1), y+s(1), topX+x+s(1+column.width), y+s(11)+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) dxDrawText( content, topX+theX, 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 )end Rank ClientSide function loadmedalla() dios = "Rangos/Dios.png" setElementData(getLocalPlayer(),"Medalla",dios) end addEventHandler("onClientResourceStart",getRootElement(),loadmedalla) addEventHandler("onClientPlayerSpawn",getRootElement(),loadmedalla) this was another way. Serverside addEventHandler("onPlayerSpawn",root, function () local cuenta = getPlayerAccount(source) if isGuestAccount(cuenta) then return end local rango = getAccountData(cuenta,"Rango") if rango then setElementData(source,"Rango", rango) setElementData(source,"Medalla","Rangos/"..rango..".png) end end ) and debugscript say dxDrawImagen cant load file. I added to meta and the path is allright. im try setElementData in serverside and clientside. What is wrong? or what is the best way to make this? Thanks for your time Link to comment
HunT Posted September 3, 2012 Share Posted September 3, 2012 Look My Post About Ranks Images in ScoreBoard. viewtopic.php?f=91&t=38195&hilit=Rank+to+number Link to comment
BorderLine Posted September 3, 2012 Author Share Posted September 3, 2012 i did.. but i dont know how you fix it as tapl said, filepath is content. so i need make the getElementData in scoreboard? Link to comment
HunT Posted September 3, 2012 Share Posted September 3, 2012 First u not need the client script. Script server side (in my post) Edit the dxscoreboard (in my post) Value ranks numbers (if u have the name, u can convert the name to number with table) And ranks .png (example 0.png = guest 1.png = rank 1) Anyway if u have the problem I can give u the script in pm,but later now I job. Link to comment
BorderLine Posted September 3, 2012 Author Share Posted September 3, 2012 thanks hunterix, Now im gonna test it Link to comment
HunT Posted September 3, 2012 Share Posted September 3, 2012 thanks hunterix, Now im gonna test it Fine if u have the problem i'm here. 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