-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.lua
More file actions
165 lines (164 loc) · 4.88 KB
/
config.lua
File metadata and controls
165 lines (164 loc) · 4.88 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
Config = {
PlayerDisplayPrefixes = {
{'prefix.admin', '^1[Administrator] '},
{'prefix.moderator', '^2[Moderator] '},
{'prefix.staff', '^2[Staff] '},
{'prefix.lspd', '^5[LSPD] '},
{'prefix.bcso', '^3[BCSO] '},
{'prefix.sahp', '^3[SAHP] '},
{'prefix.safr', '^2[SAFR] '},
{'prefix.sast', '^5[SAST] '},
},
SwearFilter = {
'nigger',
'nigg?a',
'retard',
'nazi',
'hitler',
'fag',
'faggot',
},
DefaultDensity = .5,
ServerNotifications = {
chatPublic = {
GetConvar('framework_ServerNotifications_chatPublic', ''),
function (source, data)
local username = GetPlayerName(source)
if not username then username = 'N/A' end
username = username .. ' [ID: ' .. source .. ']'
return {
username = username,
content = data,
allowed_mentions = { -- content sanitisation
parse = { 'roles', 'users', 'everyone' }
},
}
end
},
chatPrivate = {
GetConvar('framework_ServerNotifications_chatPrivate', ''),
function (source, data)
local username = GetPlayerName(source)
if not username then username = 'N/A' end
username = username .. ' [ID: ' .. source .. ']'
return {
username = username,
content = data,
allowed_mentions = { -- content sanitisation
parse = { 'roles', 'users', 'everyone' }
},
}
end
},
staffPublic = {
GetConvar('framework_ServerNotifications_staffPublic', ''),
function (source, data)
return {
username = 'System',
content = '',
embeds = {
{
title = data.title,
description = data.description,
footer = data.footer,
fields = data.fields,
color = 0x15A3C7,
}
},
allowed_mentions = {
parse = { 'roles', 'users', 'everyone' }
},
}
end
},
staffPrivate = {
GetConvar('framework_ServerNotifications_staffPrivate', ''),
function (source, data)
return {
username = 'System',
content = '',
embeds = {
{
title = data.title,
description = data.description,
footer = data.footer,
fields = data.fields,
color = 0x15A3C7,
}
},
allowed_mentions = {
parse = { 'roles', 'users', 'everyone' }
},
}
end
},
serverPublic = {
GetConvar('framework_ServerNotifications_serverPublic', ''),
function (source, data)
return {
username = 'System',
content = '```css\n' .. data .. '\n```',
allowed_mentions = {
parse = { 'roles', 'users', 'everyone' }
},
}
end
},
serverPrivate = {
GetConvar('framework_ServerNotifications_serverPrivate', ''),
function (source, data)
return {
username = 'System',
content = '```css\n' .. data .. '\n```',
allowed_mentions = {
parse = { 'roles', 'users', 'everyone' }
},
}
end
},
},
Reminders = {
Interval = 10,
Messages = {
'Join our ^6Discord^7 server: ^5^_https://discord.gg/Hfxz3Aj',
'Join our ^6Discord^7 server: ^3^_/discord',
'Make sure you\'re up to date with the ^3^_/rules',
'Make sure to read the rules on our ^6Discord^7: ^3^_/rules',
'Want to become an ^4LEO^7 or ^1Fire^7/^1EMS^7? Get ^3whitelisted^7 by asking a ^5moderator^7 or joining the ^6Discord^7 server: ^3^_/discord',
'Unsure about keybinds? Need help getting started? Use the ^3^_/help^0^r command!',
'The server uses ^6OneSync Infinity^7, so you can only see ^3nearby^7 players.',
function()
local admins = {}
for _, player in ipairs(GetPlayers()) do
for _, arr in ipairs({
{ 'prefix.admin', '~r~' },
{ 'prefix.moderator', '~g~' },
}) do
if IsPlayerAceAllowed(player, arr[1]) then
table.insert(admins, arr[2] .. (GetPlayerName(player) or 'Someone') .. '~s~')
break
end
end
end
local str = ''
for i, name in ipairs(admins) do
if i == #admins then
str = str .. name
else
str = str .. name .. ', '
end
end
if #admins == 0 then
return 'There are currently 0 moderators online.'
else
return 'There are currently ' .. #admins .. ' moderators online: ' .. str
end
end,
function()
if #GetPlayers() <= 3 then
return "Looks like not many people are online. You can join the ^6Discord^7 server to be notified when more people are on: ^5^_/discord^7"
end
end
},
},
}