mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
REFACTORRRRRR
fuck you
This commit is contained in:
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user