Jump to content

Help TopKiller ColorName


Estevam2d

Recommended Posts

My problem is that all who reach the highest level of kill are yellow in scorebord.

just want only the top kill is yellow and not all, and if he loses the title of top kill the player's name ficase red again.

function CopKillerer() 
local var = 0 
local HighPlayer = false 
    for k,v in ipairs (getPlayersInTeam (getTeamFromName("Criminoso"))) do 
    local kills = getElementData(v,'kills') 
    if kills then 
    if kills > var then      
    var = kills 
    setPlayerNametagColor ( v, 221, 211, 45 ) 
           setElementData( v, "Occupation", "Criminal", true ) 
    HighPlayer = v 
           end 
         end    
    end 
    return HighPlayer 
end 
setTimer ( CopKillerer, 1000, 0 ) 

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