Jump to content

Problems wirth imgs in score


BorderLine

Recommended Posts

Posted

Hi everyone, well im here cus i have a little problem.

Im adding images rank as same Level

so, i have a problem

function ranks() 
    local account = getPlayerAccount(source) 
    local zombiekills = getAccountData(account,"play.kill") 
if (zombiekills >= 0) and (zombiekills <= 500) then 
setAccountData ( account, "Rango", "Civil" ) 
setElementData ( source , " Rank", "Civil.png") 
elseif (zombiekills >= 300000) then 
setAccountData ( account, "Rango", "Dios" ) 
setElementData ( source, "Rank", "Dios.png" ) 
end 
end 

the problem is. If i have more than 300,000 kills then my image rank is showed on scoreboard. But if some player have less than 500 then dont show the image. and debug say can't load image (scoreboard)

meta is good. path is good. what should be the problem?

Posted

Try

function ranks() 
     local account = getPlayerAccount(source) 
     local zombiekills = getAccountData(account,"play.kill") or 0 
     if (zombiekills <= 500) then 
          setAccountData(account, "Rango", "Civil") 
          setElementData(source , " Rank", "Civil.png") 
     elseif (zombiekills >= 300000) then 
          setAccountData(account, "Rango", "Dios") 
          setElementData(source, "Rank", "Dios.png") 
     end 
end 

Posted

still problem

this is the line of the error in debugscript

elseif column.name == "Rank" then 
dxDrawImage( topX+theX, y+s(1), 30, 30, content, 0, 0, 0, cWhite, drawOverGUI ) 

i dont think this can be the problem. if show one image why not another?

can be a problem the resolution of image?

Dios.png is 256zx256 and Civil.png is 64x64

Posted

The problem is that scoreboard is in a different resource so it's trying to load the picture as if it would be in scoreboard resource. You must use full path ":resource\image.png".

Posted

well, it's based on the script so, edit the dxDrawImage, you could adjust the image size in anyway or form...

play around with it and see the results

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...