mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 22:06:02 +01:00
(fix) Fixed Chat and Jailing
-Fixed chat for framework -Fixed jailing and lil speling mistake
This commit is contained in:
@@ -35,12 +35,12 @@ end
|
||||
RegisterNetEvent("ND_Jailing:jailPlayer")
|
||||
AddEventHandler("ND_Jailing:jailPlayer", function(id, time, fine, reason)
|
||||
local player = source
|
||||
local players = exports["ND_Core"]:getCharacterTable()
|
||||
local dept = players[player].dept
|
||||
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
|
||||
exports["ND_Core"]: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