Mini Leader Board
Last updated
Last updated
RegisterCommand("createMiniList",function()
local data = {
[1] = {
name = "Player 1", -- type must be string
color = "COLOR_WHITE", -- type must be string
score = math.random( 0,250 ), -- type must be string
},
[2] = {
name = "Player 2", -- type must be string
color = "COLOR_WHITE", -- type must be string
score = math.random( 0,250 ), -- type must be string
},
[3] = {
name = "Player 3", -- type must be string
color = "COLOR_WHITE", -- type must be string
score = math.random( 0,250 ), -- type must be string
},
[4] = {
name = "Player 4", -- type must be string
color = "COLOR_WHITE", -- type must be string
score = math.random( 0,250 ), -- type must be string
}
}
local leaderboard = miniLeaderBoard(data)
Wait(2000)
local uData = {
[1] = {
name = "Player 1", -- type must be string
color = "COLOR_Blue", -- type must be string
score = math.random( 0,250 ), -- type must be string
}
}
leaderboard:update(uData)
Wait(2000)
local uData = {
[2] = {
name = "Player 2 change name", -- type must be string
color = "COLOR_Red", -- type must be string
score = math.random( 0,250 ), -- type must be string
},
[1] = {
name = "Player 1 change name", -- type must be string
color = "COLOR_Red", -- type must be string
score = math.random( 0,250 ), -- type must be string
}
}
leaderboard:update(uData)
Wait(2000)
local uData = {
[3] = {
name = "Player 3 change name", -- type must be string
score = math.random( 0,250 ), -- type must be string
},
[4] = {
name = "Player 4 change name", -- type must be string
color = "COLOR_Black", -- type must be string
score = math.random( 0,250 ), -- type must be string
}
}
leaderboard:update(uData)
Wait(2000)
leaderboard:clear()
end)