-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathserver.lua
More file actions
32 lines (27 loc) · 936 Bytes
/
server.lua
File metadata and controls
32 lines (27 loc) · 936 Bytes
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
require 'modules.mysql.server'
require 'modules.queue.server'
require 'modules.connection.server'
require 'modules.events.server'
require 'modules.commands.server'
if GetConvar('mz_queue:versioncheck', 'true') == 'true' then
lib.versionCheck('m3ftwz/mz_queue')
end
local hardcap = GetResourceState('hardcap')
if hardcap ~= 'missing' and (hardcap == 'started' or hardcap == 'starting') then
StopResource("hardcap")
print("[^6QUEUE^0]: ^1hardcap^0 resource was stopped due to incompatibility issues.")
end
AddEventHandler("onResourceStarting", function(resource)
if resource == "hardcap" then
CancelEvent()
print("[^6QUEUE^0]: ^1hardcap^0 resource was stopped due to incompatibility issues with the queue system")
return
end
end)
lib.cron.new('0 * * * *', function()
SetPrioritiesLists()
print("[^6QUEUE^0]:^2 Successfully auto-refreshed priorities queues^0")
end)
SetTimeout(5000, function()
SetPrioritiesLists()
end)