Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local winner = 0
- local data = {}
- local wins1 = 0
- local wins2 = 0
- local wins3 = 0
- ui.addTextArea(0, "<font color=\"#000000\">1º "..wins1.."", name, 5, 29, 100, 19, 0xcccc16, 0x000000, 1, true)
- ui.addTextArea(1, "<font color=\"#000000\">2º "..wins2.."", name, 264, 29, 100, 18, 0xc2c0bc, 0x000000, 1, true)
- ui.addTextArea(2, "<font color=\"#000000\">3º "..wins3.."", name, 584, 29, 100, 19, 0xd17936, 0x000000, 1, true)
- function eventNewGame()
- winner = 0
- end
- function eventPlayerWon(name)
- winner = winner + 1
- if winner == 1 then
- print(name.." chegou em "..winner.."º")
- data[name].wins1 = data[name].wins1 + 1
- ui.addTextArea(0, "<font color=\"#000000\">1º "..data[name].wins1.."", name, 5, 29, 100, 19, 0xcccc16, 0x000000, 1, true)
- elseif winner == 2 then
- print(name.." chegou em "..winner.."º")
- data[name].wins2 = data[name].wins2+1
- ui.addTextArea(1, "<font color=\"#000000\">2º "..data[name].wins2.."", name, 264, 29, 100, 18, 0xc2c0bc, 0x000000, 1, true)
- elseif winner == 3 then
- print(name.." chegou em "..winner.."º")
- data[name].wins3 = data[name].wins3+1
- ui.addTextArea(2, "<font color=\"#000000\">3º "..data[name].wins3.."", name, 584, 29, 100, 19, 0xd17936, 0x000000, 1, true)
- end
- end
- function eventNewPlayer(name)
- data[name] = {
- wins1 = 0,
- wins2 = 0,
- wins3 = 0,
- }
- ui.addTextArea(0, "<font color=\"#000000\">1º "..wins1.."", name, 5, 29, 100, 19, 0xcccc16, 0x000000, 1, true)
- ui.addTextArea(1, "<font color=\"#000000\">2º "..wins2.."", name, 264, 29, 100, 18, 0xc2c0bc, 0x000000, 1, true)
- ui.addTextArea(2, "<font color=\"#000000\">3º "..wins3.."", name, 584, 29, 100, 19, 0xd17936, 0x000000, 1, true)
- end
- table.foreach(tfm.get.room.playerList,eventNewPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement