Jump to content

about scoreboard


BorderLine

Recommended Posts

Replace This :

  
-- String  1138  
-- Player/team click 
        local y = topY+s(5) 
        if (serverInfo.server or serverInfo.players) and showServerInfo then y = y+dxGetFontHeight( fontscale(serverInfoFont, scoreboardScale), serverInfoFont ) end 
        if (serverInfo.gamemode or serverInfo.map) and showGamemodeInfo then y = y+dxGetFontHeight( fontscale(serverInfoFont, scoreboardScale), serverInfoFont ) end 
        y = y+s(3) 
        y = y+s(5)+dxGetFontHeight( fontscale(columnFont, scoreboardScale), columnFont ) 
        if cY >= y and cX then 
            local index = firstVisibleIndex 
            local maxPerWindow = getMaxPerWindow() 
            local topX, topY = (sX/2)-(calculateWidth()/2), (sY/2)-(calculateHeight()/2) 
            local width = calculateWidth() 
            while ( index < firstVisibleIndex+maxPerWindow and scoreboardContent[index] ) do 
                local element = scoreboardContent[index]["__SCOREBOARDELEMENT__"] 
                local font = iif( element and isElement( element ) and getElementType( element ) == "team", teamHeaderFont, contentFont ) 
                if cX >= topX+s(5) and cX <= topX+width-s(5) and cY >= y and cY <= y+dxGetFontHeight( fontscale(font, scoreboardScale), font ) then 
                    local selected = (not selectedRows[element]) == true 
                    local triggered = triggerEvent( "onClientPlayerScoreboardClick", element, selected, cX, cY ) 
                    if triggered then 
                        selectedRows[element] = not selectedRows[element] 
                    end 
                end 
                y = y + dxGetFontHeight( fontscale(font, scoreboardScale), font ) 
                index = index + 1 
            end 
        end 
    end 
end 
  
  

Whit This :

  
-- Player/team click 
        local y = topY+s(5) 
        if showGamemodeInfo and showServerInfo then y = y+dxGetFontHeight( fontscale(serverInfoFont, scoreboardScale), serverInfoFont ) end 
        if showGamemodeInfo or showServerInfo then y = y+dxGetFontHeight( fontscale(serverInfoFont, scoreboardScale), serverInfoFont ) end 
        y = y+s(3) 
        y = y+s(5)+dxGetFontHeight( fontscale(columnFont, scoreboardScale), columnFont ) 
        if cY >= y and cX then 
            local index = firstVisibleIndex 
            local maxPerWindow = getMaxPerWindow() 
            local topX, topY = (sX/2)-(calculateWidth()/2), (sY/2)-(calculateHeight()/2) 
            local width = calculateWidth() 
            while ( index < firstVisibleIndex+maxPerWindow and scoreboardContent[index] ) do 
                local element = scoreboardContent[index]["__SCOREBOARDELEMENT__"] 
                if element and isElement( element ) and getElementType( element ) == "team" then 
                    if cX >= topX+s(5) and cX <= topX+width-s(5) and cY >= y and cY <= y+dxGetFontHeight( fontscale(teamHeaderFont, scoreboardScale), teamHeaderFont ) then 
                        selectedRows[element] = not selectedRows[element] 
                        local selected = selectedRows[element] == true 
                        triggerEvent( "onClientPlayerScoreboardClick", element, selected, cX, cY ) 
                    end 
                    y = y + dxGetFontHeight( fontscale(teamHeaderFont, scoreboardScale), teamHeaderFont ) 
                else 
                    if cX >= topX+s(5) and cX <= topX+width-s(5) and cY >= y and cY <= y+30 then 
                        selectedRows[element] = not selectedRows[element] 
                        local selected = selectedRows[element] == true 
                        triggerEvent( "onClientPlayerScoreboardClick", element, selected, cX, cY ) 
                    end 
                    y = y + 30 
                end 
                index = index + 1 
            end 
        end 
    end 
end 
  

DON'T Forget . . .delete every time the client file cache.

Edit - Delete Cache - Refresh

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