Jump to content

adding ranks on scoreboard


ArcAngeL

Recommended Posts

Hello All,

Why ı cant create rank in scoreboard when players kill players ? just it creating 'Rango' on scoreboard but ranks is not created.please help me thanks.

 

exports.scoreboard:addScoreboardColumn('Rango')
 
addEventHandler("onPlayerSpawn",root,
function()
    local account = getPlayerAccount(source)
    local kills = getAccountData(account,"kills")
if (kills >= 0) and (kills <= 4) then
setAccountData ( account, "Rango", "Nuevo" )
elseif (kills >= 5) and (kills <= 99) then
setAccountData ( account, "Rango", "Iniciado" )
elseif (kills >= 100) and (kills <= 249) then
setAccountData ( account, "Rango", "Aficionado" )
elseif (kills >= 250) and (kills <= 499) then
setAccountData ( account, "Rango", "Amateur" )
elseif (kills >= 500) and (kills <= 999) then
setAccountData ( account, "Rango", "Asesino" )
elseif (kills >= 1000) and (kills <= 1499) then
setAccountData ( account, "Rango", "Maestro" )
elseif (kills >= 1500) and (kills <= 1999) then
setAccountData ( account, "Rango", "Cannibal" )
elseif (kills >= 2000) and (kills <= 2999) then
setAccountData ( account, "Rango", "Rampager" )
elseif (kills >= 3000) and (kills <= 3999) then
setAccountData ( account, "Rango", "Monster" )
elseif (kills >= 4000) and (kills <= 4999) then
setAccountData ( account, "Rango", "Blooder" )
elseif (kills >= 5000) and (kills <= 5999) then
setAccountData ( account, "Rango", "ZombieKiller" )
elseif (kills >= 5000) and (kills <= 5999) then
setAccountData ( account, "Rango", "HeadShooter" )
elseif (kills >= 6000) and (kills <= 6999) then
setAccountData ( account, "Rango", "Animal" )
elseif (kills >= 7000) and (kills <= 7999) then
setAccountData ( account, "Rango", "Depredador" )
elseif (kills >= 8000) and (kills <= 8999) then
setAccountData ( account, "Rango", "Psicopata" )
elseif (kills >= 9000) and (kills <= 10000000) then
setAccountData ( account, "Rango", "PsykoKiller" )
end
end
)

addEventHandler("onPlayerSpawn",root,
function ()
    local cuenta = getPlayerAccount(source)
    if isGuestAccount(cuenta) then return end
    local rango = getAccountData(cuenta,"Rango")
    if rango then
        setElementData(source,"Rango", rango)
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...