If you send a player to Jail via mdt they get taken to the mugshot area but they dont get taken off their clothes and inventory items.
Regardless if TriggerServerEvent("police:client:JailPlayer", targetSourceId, sentence) or TriggerServerEvent("police:server:JailPlayer", targetSourceId, sentence) is used.
If you send a Player via radialmenu to Jail which uses the TriggerServerEvent("police:client:JailPlayer", targetSourceId, sentence)
event then it works how it should.
Any one haveing an idea?
RegisterNUICallback("sendToJail", function(data, cb)
QBCore.Functions.TriggerCallback('ps-mdt:server:MugShotWebhook', function(MugShotWebhook)
if MugShotWebhook ~= '' then
local citizenId, sentence = data.citizenId, data.sentence
-- Gets the player id from the citizenId
local p = promise.new()
QBCore.Functions.TriggerCallback('mdt:server:GetPlayerSourceId', function(result)
p:resolve(result)
end, citizenId)
local targetSourceId = Citizen.Await(p)
if sentence > 0 then
if Config.UseCQCMugshot then
TriggerServerEvent('cqc-mugshot:server:triggerSuspect', targetSourceId)
end
Citizen.Wait(5000)
-- Uses qb-policejob JailPlayer event
TriggerServerEvent("police:client:JailPlayer", targetSourceId, sentence)
--TriggerServerEvent("police:server:JailPlayer", targetSourceId, sentence)
end
end
end)
end)
Edit sorry I have no idea how to assign labels here.
If you send a player to Jail via mdt they get taken to the mugshot area but they dont get taken off their clothes and inventory items.
Regardless if TriggerServerEvent("police:client:JailPlayer", targetSourceId, sentence) or TriggerServerEvent("police:server:JailPlayer", targetSourceId, sentence) is used.
If you send a Player via radialmenu to Jail which uses the TriggerServerEvent("police:client:JailPlayer", targetSourceId, sentence) event then it works how it should.
Any one haveing an idea?
RegisterNUICallback("sendToJail", function(data, cb) QBCore.Functions.TriggerCallback('ps-mdt:server:MugShotWebhook', function(MugShotWebhook) if MugShotWebhook ~= '' then local citizenId, sentence = data.citizenId, data.sentence
end)
Edit sorry I have no idea how to assign labels here.