Дизайнер
-
Автор темы
- #1
Код:
-- clantag
----- src
local switch = ui.create("Clantag"):switch("Enable")
--
local clantag = {
speed = 2,
step = 1,
ref = ui.find("Miscellaneous", "Main", "In-Game", "Clan Tag"),
list = {
"1",
"2",
"3",
},
run = function (self)
local work = function ()
local time = math.floor( globals.curtime * self.speed + 0.5 )
local i = time % #self.list + 1
if i == self.step then return end
self.step = i
self.ref:override(false)
common.set_clan_tag(self.list[i])
end
switch:set_callback(function (this)
if this:get() then
events.net_update_end:set(work)
else
events.net_update_end:unset(work)
common.set_clan_tag("")
end
end, true)
events.shutdown:set(function ()
common.set_clan_tag("")
self.ref:override()
end)
end
}
--
clantag:run()