Jump to content

Toptimes Player team


Dex

Recommended Posts

Hi all!, I wanted to change the top tag (original name) 'playerName' by my name tag with the my team.

Original Tag: Example|TAG In my team: Example|TAG

I want the toptimes appear with the team that are within as well as the example "Example|TAG"

idk if it'll be ok the script =/

function CToptimes:doOnServerSentToptimes( data, serverRevision, playerPosition ) 
    outputDebug( 'TOPTIMES', 'CToptimes:doOnServerSentToptimes ' .. tostring(#data) ) 
  
    local numLines = math.clamp( 0, #data, 50 ) 
    self.size.y = 15 + 46 + 15 * numLines 
  
    local sizeX = self.size.x 
    local sizeY = self.size.y 
    guiSetSize( self.gui['windowbg'], sizeX, sizeY, false ) 
  
    self:updateLabelCount(numLines) 
  
    for i=1,numLines do 
  
        local timeText = data[i].timeText 
        if timeText:sub(1,1) == '0' then 
            timeText = '  ' .. timeText:sub(2) 
        end 
        local line = string.format( '%d.         %s     %s', i, timeText, data[i].getPlayerNametagColor ) -- i change playerName with getPlayerNametagColor 
        guiSetText ( self.gui['listTimes'][i], line ) 
  
        if i == playerPosition then 
            guiLabelSetColor ( self.gui['listTimes'][i], 255, 255, 255 ) 
        else 
            guiLabelSetColor ( self.gui['listTimes'][i], 255, 255, 255 ) 
        end 
    end 

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