Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mice = {}
- local ganadores = {}
- local tabla_temporal = {}
- local contador = 0
- local contador_in = 5
- local tiempo = 0
- local text = false
- local time = 60
- function main()
- for name in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- end
- end
- function eventLoop()
- contador_in = contador_in - 0.5
- if contador_in > -1 then
- ui.addTextArea(0, "<p align='center'><b><font size='18'>Preparados...Empezamos en <v>"..math.ceil(contador_in).."", nil, 270, 27, 300, 50, 0x003366, 0x000000, 1)
- end
- if contador_in == -1 then
- ui.addTextArea(0, "<p align='center'><b><font size='18'>ยกA clickear!", nil, 270, 27, 300, 50, 0x003366, 0x000000, 1)
- empezar_clicks()
- end
- if text == true then
- tiempo = tiempo + 0.5
- if tiempo == 1 then
- tiempo = 0
- ui.addTextArea(5, "<a href='event:click'> ", nil, math.random(50,700), math.random(50,350), 20, 20, math.random(0x000000, 0xFFFFFF), math.random(0x000000, 0xFFFFFF), 1)
- end
- time = time - 0.5
- tfm.exec.setUIMapName(math.ceil(time))
- end
- if time == 0 then
- time = 98888888885456
- for name in pairs(tfm.get.room.playerList) do
- table.insert(tabla_temporal, ""..name.." : "..mice[name].click.."")
- end
- table.sort(tabla_temporal, function(a,b) return a>b end)
- ui.addTextArea(1, "<b><font size='14' color='#000'><p align='center'>Cantidad de clicks.</p><br>"..table.concat(tabla_temporal, "<br>").."", nil, 13, 27, 150, 200, 0x0099ff, 0x000000, 1)
- text = false
- ui.removeTextArea(5,nil)
- end
- end
- function eventTextAreaCallback(id, name, c)
- if c == "click" then
- mice[name].click = mice[name].click + 1
- end
- end
- function eventNewPlayer(name)
- mice[name] = {click = 0}
- end
- function empezar_clicks()
- text=true
- end
- --A la hora de ganar
- --[[
- contador = contador + 1
- table.insert(ganadores, "<n><font color='#000'>"..contador..". "..name.."") ]]
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement