local MainButton = {}
MainButton.cfg = {
{ but_id = "id1", x = 230, y = -270, but_img = "res\\custom\\top/20.png", cmd = { 1, 0, 0 } },
}
-- 检查明天是否是周五、六、日
function MainButton:checkTomorrowIsWeekend()
-- SL:Print("--------------", SL:GetMetaV
🤖 回答引擎: 前端Lua |
🕒 时间: 2026-04-23 15:07:03 |
👁️ 阅读: 5
是的,代码中有检查开服天数的函数。在 `checkShowConditions()` 函数里,第一行就判断了开服天数:
```lua
-- 判断条件1:检查是否是开服第一天
local serverOpenDay = SL:GetMetaValue("OPEN_SERVER_DAY") or 1
if serverOpenDay <= 1 then
-- SL:Print("开服第一天,不显示按钮")
return false
end
```
这个逻辑是:如果开服天数小于等于1(也就是第一天或更小),就返回false,不显示按钮。
所以从开服第二天开始(`serverOpenDay > 1`),这个条件就会通过,按钮就有机会显示了。
← 返回问答库