REFACTORRRRRR

fuck you
This commit is contained in:
Niko
2022-07-16 00:12:02 -04:00
parent 68721a4633
commit 44b21a1398
19 changed files with 136 additions and 143 deletions

View File

@@ -1,5 +1,5 @@
NDCore = exports["ND_Core"]:GetCoreObject()
NDCore.functions:versionChecker("ND_Jailing", GetCurrentResourceName(), "https://github.com/Andyyy7666/ND_Framework", "https://raw.githubusercontent.com/Andyyy7666/ND_Framework/main/ND_Jailing/fxmanifest.lua")
NDCore.Functions.VersionChecker("ND_Jailing", GetCurrentResourceName(), "https://github.com/Andyyy7666/ND_Framework", "https://raw.githubusercontent.com/Andyyy7666/ND_Framework/main/ND_Jailing/fxmanifest.lua")
local jailedPlayers = {}
@@ -35,12 +35,12 @@ end
RegisterNetEvent("ND_Jailing:jailPlayer")
AddEventHandler("ND_Jailing:jailPlayer", function(id, time, fine, reason)
local player = source
local players = NDCore.functions:getPlayers()
local players = NDCore.Functions.GetPlayers()
local dept = players[player].job
for _, department in pairs(config.accessDepartments) do
if department == dept then
jailedPlayers[GetPlayerIdentifierFromType("license", id)] = time
NDCore.functions:deductMoney(fine, id, "bank")
NDCore.Functions.DeductMoney(fine, id, "bank")
TriggerClientEvent("ND_Jailing:jailPlayer", id, time)
sendToDiscord("Jail Logs", "**" .. GetPlayerName(player) .. "** Jailed **" .. GetPlayerName(id) .. "** for **" .. time .. " seconds** with the reason: **" .. reason .. "**.", 1595381)
TriggerClientEvent('chat:addMessage', -1, {