mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
Update commands.lua
This commit is contained in:
@@ -1,10 +1,4 @@
|
||||
------------------------------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- DO NOT EDIT IF YOU DON'T KNOW WHAT YOU'RE DOING --
|
||||
-- --
|
||||
-- For support join my discord: https://discord.gg/Z9Mxu72zZ6 --
|
||||
------------------------------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- For support join my discord: https://discord.gg/Z9Mxu72zZ6
|
||||
|
||||
if config.enableAopCommand then
|
||||
local aop = config.defaultAop
|
||||
@@ -48,6 +42,29 @@ if config.enablePriorityCooldown then
|
||||
RegisterCommand(config.stopPriorityCommand, function(source, args, rawCommand) -- stop the priority & update.
|
||||
priorityCooldown(config.cooldownAfterPriority)
|
||||
end, false)
|
||||
RegisterCommand(config.cooldownPriorityCommand, function(source, args, rawCommand)
|
||||
local time = tonumber(args[1])
|
||||
if time then
|
||||
priorityCooldown(time)
|
||||
end
|
||||
end, false)
|
||||
RegisterCommand(config.joinPriorityCommand, function(source, args, rawCommand)
|
||||
if string.find(priority, "Active") then
|
||||
if not string.find(priority, GetPlayerName(source)) then
|
||||
priority = string.gsub(priority, "%)", "")
|
||||
priority = priority .. ", " .. GetPlayerName(source) .. ")"
|
||||
TriggerClientEvent("returnPriority", -1, priority)
|
||||
end
|
||||
end
|
||||
end, false)
|
||||
RegisterCommand(config.leavePriorityCommand, function(source, args, rawCommand)
|
||||
if string.find(priority, "Active") then
|
||||
if string.find(priority, GetPlayerName(source)) then
|
||||
priority = string.gsub(priority, ", " .. GetPlayerName(source), "")
|
||||
TriggerClientEvent("returnPriority", -1, priority)
|
||||
end
|
||||
end
|
||||
end, false)
|
||||
|
||||
-- Priority count down and updates.
|
||||
function priorityCooldown(time)
|
||||
|
||||
Reference in New Issue
Block a user