Jump to content

Rank


Recommended Posts

Hello, its me again, i have a bug in scoreboard, it wont show level image, here is the code.

exports.scoreboard:addScoreboardColumn('Rank',getRootElement(),1,40,'Rank') 
function scoreLevel () 
    local account = getPlayerAccount(source) 
    local Level = getAccountData(account, "LV") 
    if isGuestAccount ( account ) then 
        setElementData(source, "Rank",":experience\\ranks\\lvl_0.png") 
    else 
        setElementData(source, "Rank", tostring(":experience\\ranks\\lvl_"..Level..".png" ))                                       
    end 
end 
addEventHandler("onPlayerSpawn", getRootElement(), scoreLevel) 
addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), 
function() 
        call(getResourceFromName("scoreboard"),"addScoreboardColumn","Rank", getRootElement(), 1, 40) 
    end 
) 
  

i add this line to dxscoreboard_client.lua

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

Link to comment

U need delete the client and old scoreboard resource.

First stop the resource scoreboard.

Go to - MTA San Andreas / mods / deathmatch / resource / and delete scoreboard

Go to - MTA San Andreas / server / mods / deathmatch / resource-cache / http-client-files /and delete scoreboard

Back on server and /start scoreboard

Link to comment

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