-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.lua
More file actions
136 lines (122 loc) · 5.21 KB
/
config.lua
File metadata and controls
136 lines (122 loc) · 5.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
Config = {}
-- Language setting: 'zh-CN', 'en', 'es', 'fr', 'de', 'pt-BR'
Config.Locale = 'zh-CN'
-- Tracking interval in milliseconds (default: 60000 = 1 minute)
Config.UpdateInterval = 60000
-- Command names (change these to customize in-game commands)
Config.Commands = {
onlinetime = 'onlinetime', -- Player checks own online time
toptime = 'toptime', -- View online time leaderboard
admintime = 'admintime', -- Admin checks a player's online time
resettime = 'resettime', -- Admin resets a player's online time
dailytime = 'dailytime', -- View today's online time
weeklytime = 'weeklytime', -- View this week's online time
monthlytime = 'monthlytime', -- View this month's online time
rewards = 'rewards', -- View milestone rewards progress
loginreward = 'loginreward', -- View daily login reward status
uptime = 'uptime', -- Open NUI dashboard panel
}
-- Leaderboard settings
Config.Leaderboard = {
maxEntries = 10, -- Number of players shown on leaderboard
}
-- Admin permission groups
Config.AdminGroups = {
'admin',
'superadmin',
}
-- AFK Detection settings (fully server-side, no client trust)
Config.AFK = {
enabled = true,
timeout = 300, -- Seconds of no movement before marking as AFK (default: 5 minutes)
checkInterval = 15, -- Server check interval in seconds (default: 15 seconds)
minDistance = 5.0, -- Minimum distance (meters) to move within checkInterval to count as active
kickEnabled = false, -- Kick player after extended AFK (optional)
kickTimeout = 1800, -- Seconds before AFK kick (default: 30 minutes, only if kickEnabled)
kickMessage = 'You have been kicked for being AFK too long.',
}
-- Milestone Rewards settings
-- Supported reward types: 'money' (default), 'item', 'vehicle'
-- For items: add item = 'item_name', count = amount
-- For vehicles: add callback = function(src, identifier) ... end
-- Money field is always given if present, regardless of type
Config.Rewards = {
enabled = true,
milestones = {
{ hours = 1, money = 5000, label = '1h' },
{ hours = 5, money = 15000, label = '5h' },
{ hours = 10, money = 30000, label = '10h' },
{ hours = 24, money = 50000, label = '24h' },
{ hours = 48, money = 80000, label = '48h' },
{ hours = 100, money = 150000, label = '100h' },
{ hours = 200, money = 300000, label = '200h' },
{ hours = 500, money = 500000, label = '500h' },
-- Example item reward:
-- { hours = 10, type = 'item', item = 'bread', count = 5, money = 10000, label = '10h Item' },
-- Example vehicle reward (requires custom callback):
-- { hours = 500, type = 'vehicle', callback = function(src, id) ... end, label = '500h Vehicle' },
},
}
-- Daily Login Rewards settings
Config.DailyLogin = {
enabled = true,
gracePeriod = 1, -- Days allowed to miss before streak resets (0 = strict)
rewards = {
-- Day 1-7 cycle (repeats after day 7)
{ day = 1, money = 1000 },
{ day = 2, money = 2000 },
{ day = 3, money = 3000 },
{ day = 4, money = 4000 },
{ day = 5, money = 5000 },
{ day = 6, money = 7500 },
{ day = 7, money = 10000 }, -- Weekly bonus
},
}
-- Playtime-Gated Roles (auto-assign groups based on total playtime)
Config.PlaytimeRoles = {
enabled = true,
roles = {
-- { hours = required_hours, group = 'esx_group_name', label = 'display_name' }
-- Players are assigned the highest role they qualify for
-- NOTE: Only applies to players in the 'user' group (won't demote admins)
},
}
-- Data Maintenance settings
Config.Maintenance = {
cleanupEnabled = false, -- Auto-purge inactive player data
inactiveDays = 90, -- Days of inactivity before cleanup
cleanupTime = '04:00', -- Time to run cleanup (HH:MM, server time)
}
-- First-Join Welcome Bonus
Config.FirstJoin = {
enabled = true,
bonusMoney = 5000, -- Welcome bonus for first-time players
}
-- HTTP API settings (for external tools, web dashboards, Discord bots)
Config.API = {
enabled = false,
apiKey = '', -- Set a secret key; clients must send "Authorization: Bearer <key>"
}
-- Discord Role Sync (auto-assign Discord roles based on playtime)
-- Requires a Discord Bot Token (more powerful than webhooks)
Config.DiscordRoles = {
enabled = false,
botToken = '', -- Your Discord Bot token
guildId = '', -- Your Discord server (guild) ID
roles = {
-- { hours = required_hours, roleId = 'discord_role_id' }
-- Example:
-- { hours = 10, roleId = '123456789012345678' },
-- { hours = 50, roleId = '234567890123456789' },
-- { hours = 100, roleId = '345678901234567890' },
},
}
-- Discord Webhook settings
Config.Discord = {
enabled = false,
webhookUrl = '', -- Your Discord webhook URL
botName = 'Tayer Uptime',
color = 3066993, -- Green embed color (decimal)
dailyReport = false, -- Send daily server stats report to Discord
reportTime = '00:00', -- Time to send daily report (HH:MM, server time)
}