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?

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

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 

CiTLh.png
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

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

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".

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

Posted

Its fixed, thanks tapl, jay and anderl

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted

The last question. Anyone know how i can edit the scoreboar to make more high the lines

look the ranks is one over the another. I dont know how explain

the img proofot.png

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted

the problem is, only make more big the image, but i want try to make more big the rows to see beter the rank

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

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...