RegisterCommand('mdt', function()
local job = Esx.GetPlayerData().job.name
if not isShowing and job == 'police' then
ESX.TriggerServerCallback('disc-mdt:getUser', function(user)
SendNUIMessage({
type = 'SET_USER',
data = {
user = user
}
})
end)
ESX.TriggerServerCallback('disc-mdt:getCrimes', function(crimes)
SendNUIMessage({
type = "SET_CRIMES",
data = {
crimes = crimes
}
})
end)
SendNUIMessage({
type = "APP_SHOW"
})
SetNuiFocus(true, true)
startAnim()
isShowing = true
else
SendNUIMessage({
type = "APP_HIDE"
})
stopAnim()
DeleteObject(tab)
SetNuiFocus(false, false)
isShowing = false
end
end)