diff --git a/client/loops.lua b/client/loops.lua index 19b9c6d..6f3770d 100644 --- a/client/loops.lua +++ b/client/loops.lua @@ -12,7 +12,7 @@ end) CreateThread(function() while true do if LocalPlayer.state.isLoggedIn then - if (QBCore.PlayerData.metadata['hunger'] <= 0 or QBCore.PlayerData.metadata['thirst'] <= 0) and not QBCore.PlayerData.metadata['isdead'] then + if (QBCore.PlayerData.metadata['hunger'] <= 0 or QBCore.PlayerData.metadata['thirst'] <= 0) and not (QBCore.PlayerData.metadata['isdead'] or QBCore.PlayerData.metadata["inlaststand"]) then local ped = PlayerPedId() local currentHealth = GetEntityHealth(ped) local decreaseThreshold = math.random(5, 10) diff --git a/config.lua b/config.lua index da61617..c3d9a19 100644 --- a/config.lua +++ b/config.lua @@ -29,6 +29,9 @@ QBConfig.Server.Discord = "" -- Discord invite link QBConfig.Server.CheckDuplicateLicense = true -- Check for duplicate rockstar license on join QBConfig.Server.Permissions = { 'god', 'admin', 'mod' } -- Add as many groups as you want here after creating them in your server.cfg +QBConfig.Commands = {} -- Command Configuration +QBConfig.Commands.OOCColor = {255, 151, 133} -- RGB color code for the OOC command + QBConfig.Notify = {} QBConfig.Notify.NotificationStyling = { @@ -61,4 +64,4 @@ QBConfig.Notify.VariantDefinitions = { classes = 'ambulance', icon = 'fas fa-ambulance' } -} +} \ No newline at end of file diff --git a/locale/id.lua b/locale/id.lua new file mode 100644 index 0000000..5f70cc8 --- /dev/null +++ b/locale/id.lua @@ -0,0 +1,129 @@ +local Translations = { + error = { + not_online = 'Pemain tidak online', + wrong_format = 'Format Salah', + missing_args = 'Semua argumen belum dimasukkan (x, y, z)', + missing_args2 = 'Semua argumen harus diisi!', + no_access = 'Kamu tidak memiliki akses ke perintah ini', + company_too_poor = 'Perusahaan kamu tidak mampu membayar kamu', + item_not_exist = 'Barang tidak tersedia', + too_heavy = 'Inventory terlalu penuh', + location_not_exist = 'Lokasi tidak tersedia', + duplicate_license = 'Ditemukan Lisensi Rockstar Duplikat', + no_valid_license = 'Tidak Ditemukan Lisensi Rockstar yang Valid', + not_whitelisted = 'Kamu tidak masuk daftar putih untuk server ini', + server_already_open = 'Server sudah terbuka', + server_already_closed = 'Server sudah ditutup', + no_permission = 'Kamu tidak memiliki izin untuk ini..', + no_waypoint = 'Tidak ada Titik Arah yang Ditetapkan.', + tp_error = 'Kesalahan saat teleportasi.', + connecting_database_error = 'Terjadi kesalahan database saat menghubungkan ke server. (Apakah server SQL aktif?)', + connecting_database_timeout = 'Waktu koneksi ke database habis. (Apakah server SQL aktif?)', + }, + success = { + server_opened = 'Server telah dibuka', + server_closed = 'Server telah ditutup', + teleported_waypoint = 'Diteleportasi ke Titik Arah.', + }, + info = { + received_paycheck = 'Kamu telah menerima gaji $%{value}', + job_info = 'Pekerjaan: %{value} | Pangkat: %{value2} | Tugas: %{value3}', + gang_info = 'Geng: %{value} | Pangkat: %{value2}', + on_duty = 'Kamu sekarang sedang bertugas!', + off_duty = 'Kamu sekarang sedang tidak bertugas!', + checking_ban = 'Halo %s. Kami sedang memeriksa apakah kamu dilarang.', + join_server = 'Selamat datang %s di {Server Name}.', + checking_whitelisted = 'Halo %s. Kami sedang memeriksa apakah kamu masuk daftar putih', + exploit_banned = 'Kamu telah dilarang karena curang. Lihat Discord kami untuk informasi lebih lanjut: %{discord}', + exploit_dropped = 'Kamu telah dikeluarkan dari server karena eksploitasi', + }, + command = { + tp = { + help = 'TP Ke Pemain atau Koord (Khusus Admin)', + params = { + x = { name = 'id/x', help = 'ID pemain atau posisi X'}, + y = { name = 'y', help = 'posisi Y'}, + z = { name = 'z', help = 'posisi Z'}, + }, + }, + tpm = { help = 'TP Ke Penanda (Khusus Admin)' }, + togglepvp = { help = 'Tombol PVP di server (Khusus Admin)' }, + addpermission = { + help = 'Berikan Izin Pemain (Khusus Pemilik)', + params = { + id = { name = 'id', help = 'ID pemain' }, + permission = { name = 'permission', help = 'Tingkat izin' }, + }, + }, + removepermission = { + help = 'Hapus Izin Pemain (Khusus Pemilik)', + params = { + id = { name = 'id', help = 'ID pemain' }, + permission = { name = 'permission', help = 'Tingkat izin' }, + }, + }, + openserver = { help = 'Buka server untuk semua orang (Khusus Admin)' }, + closeserver = { + help = 'Tutup server untuk orang tanpa izin (Khusus Admin)', + params = { + reason = { name = 'reason', help = 'Alasan penutupan (opsional)' }, + }, + }, + car = { + help = 'Memunculkan Kendaraan (Khusus Admin)', + params = { + model = { name = 'model', help = 'Nama model kendaraan' }, + }, + }, + dv = { help = 'Hapus Kendaraan (Khusus Admin)' }, + givemoney = { + help = 'Beri Pemain Uang (Khusus Admin)', + params = { + id = { name = 'id', help = 'ID pemain' }, + moneytype = { name = 'moneytype', help = 'Jenis uang (cash, bank, crypto)' }, + amount = { name = 'amount', help = 'Jumlah uang' }, + }, + }, + setmoney = { + help = 'Tetapkan Jumlah Uang Pemain (Khusus Admin)', + params = { + id = { name = 'id', help = 'ID pemain' }, + moneytype = { name = 'moneytype', help = 'Jenis uang (cash, bank, crypto)' }, + amount = { name = 'amount', help = 'Jumlah uang' }, + }, + }, + job = { help = 'Periksa Pekerjaan Kamu' }, + setjob = { + help = 'Tetapkan Pekerjaan Pemain (Khusus Admin)', + params = { + id = { name = 'id', help = 'ID pemain' }, + job = { name = 'job', help = 'Nama pekerjaan' }, + grade = { name = 'grade', help = 'Pangkat pekerjaan' }, + }, + }, + gang = { help = 'Periksa Geng Kamu' }, + setgang = { + help = 'Tetapkan Geng Pemain (Khusus Admin)', + params = { + id = { name = 'id', help = 'ID pemain' }, + gang = { name = 'gang', help = 'Nama geng' }, + grade = { name = 'grade', help = 'Pangkat geng' }, + }, + }, + ooc = { help = 'Pesan Obrolan OOC' }, + me = { + help = 'Tampilkan pesan lokal', + params = { + message = { name = 'message', help = 'Pesan yang akan dikirim' } + }, + }, + }, +} + +if GetConvar('qb_locale', 'en') == 'id' then + Lang = Locale:new({ + phrases = Translations, + warnOnMissing = true, + fallbackLang = Lang, + }) +end diff --git a/locale/in.lua b/locale/in.lua deleted file mode 100644 index ecb3403..0000000 --- a/locale/in.lua +++ /dev/null @@ -1,28 +0,0 @@ -local Translations = { - error = { - not_online = 'Pemain tidak online', - wrong_format = 'Format salah', - missing_args = 'Tidak semua argumen telah dimasukkan (x, y, z)', - missing_args2 = 'Semua argumen harus diisi!', - no_access = 'Tidak ada akses ke perintah ini', - company_too_poor = 'Majikan kamu bangkrut', - item_not_exist = 'Barang tidak tersedia', - too_heavy = 'Inventory terlalu penuh' - }, - success = {}, - info = { - received_paycheck = 'Kamu menerima gaji kamu sebesar $%{value}', - job_info = 'Pekerjaan: %{value} | Pangkat: %{value2} | Bertugas: %{value3}', - gang_info = 'Gang: %{value} | Pangkat: %{value2}', - on_duty = 'Kamu sekarang sedang bertugas!', - off_duty = 'Kamu sekarang sedang tidak bertugas!' - } -} - -if GetConvar('qb_locale', 'en') == 'in' then - Lang = Locale:new({ - phrases = Translations, - warnOnMissing = true, - fallbackLang = Lang, - }) -end diff --git a/locale/pt-br.lua b/locale/pt-br.lua index 782a4e8..70d9ed1 100644 --- a/locale/pt-br.lua +++ b/locale/pt-br.lua @@ -1,28 +1,123 @@ local Translations = { error = { - not_online = 'O jogador não está online', - wrong_format = 'Formato inválido', + not_online = 'Jogador não está online', + wrong_format = 'Formato incorreto', missing_args = 'Nem todos os argumentos foram inseridos (x, y, z)', missing_args2 = 'Todos os argumentos devem ser preenchidos!', no_access = 'Sem acesso a este comando', - company_too_poor = 'Sua compania está quebrada', + company_too_poor = 'Seu empresa está quebrada', item_not_exist = 'O item não existe', - too_heavy = 'Inventário cheio', - duplicate_license = 'Licença duplicada da Rockstar encontrada', - no_valid_license = 'Nenhuma licença válida da Rockstar encontrada', - not_whitelisted = 'Você não tem whitelist neste servidor' + too_heavy = 'Iventário cheio', + location_not_exist = 'O local não existe', + duplicate_license = 'Licença da Rockstar duplicada encontrada', + no_valid_license = 'Nenhuma licença da Rockstar válida encontrada', + not_whitelisted = 'Você não está na lista branca(whitelist) deste servidor', + server_already_open = 'O servidor já está aberto', + server_already_closed = 'O servidor já está fechado', + no_permission = 'Você não tem permissões para isso..', + no_waypoint = 'Nenhum local definido.', + tp_error = 'Erro ao teletransportar.', + connecting_database_error = 'Ocorreu um erro de banco de dados ao conectar-se ao servidor. (O servidor SQL está ativado?)', + connecting_database_timeout = 'A conexão com o banco de dados expirou. (O servidor SQL está ativado?)', + }, + success = { + server_opened = 'O servidor foi aberto', + server_closed = 'O servidor foi fechado', + teleported_waypoint = 'Teleportado para local marcado.', }, - success = {}, info = { - received_paycheck = 'Você recebeu seu salário de %{value}€', - job_info = 'Emprego: %{value} | Grau: %{value2} | Serviço: %{value3}', - gang_info = 'Gang: %{value} | Grau: %{value2}', + received_paycheck = 'Você recebeu seu salário de $%{value}', + job_info = 'Trabalho: %{value} | Grau: %{value2} | Serviço: %{value3}', + gang_info = 'Gangue: %{value} | Grau: %{value}', on_duty = 'Você agora está de plantão!', off_duty = 'Você agora está de folga!', checking_ban = 'Olá %s. Estamos verificando se você foi banido.', - join_server = 'Bem-vindo %s a {Server Name}.', - checking_whitelisted = 'Olá %s. Estamos verificando sua whitelist.' - } + join_server = 'Bem-vindo %s a {Nome do servidor}.', + checking_whitelisted = 'Olá %s. Estamos verificando sua whitelist.', + exploit_banned = 'Você foi banido por trapacear. Confira nosso Discord para mais informações: %{discord}', + exploit_dropped = 'Você foi expulso por exploração', + }, + command = { + tp = { + help = 'TP Para Jogador ou Coordenadas (Somente administrador)', + params = { + x = { name = 'id/x', help = 'ID do jogador ou posição X'}, + y = { name = 'y', help = 'posição Y'}, + z = { name = 'z', help = 'posição Z'}, + }, + }, + tpm = { help = 'TP Para Marcador (Somente administrador)' }, + togglepvp = { help = 'Alternar PVP no servidor (Somente administrador)' }, + addpermission = { + help = 'Dê permissões ao jogador (Só Deus)', + params = { + id = { name = 'id', help = 'ID do jogador' }, + permission = { name = 'permissão', help = 'Nível de permissão' }, + }, + }, + removepermission = { + help = 'Remover permissões do jogador (Só Deus)', + params = { + id = { name = 'id', help = 'ID do jogador' }, + permission = { name = 'permissão', help = 'Nível de permissão' }, + }, + }, + openserver = { help = 'Abra o servidor para todos (somente administrador)' }, + closeserver = { + help = 'Feche o servidor para pessoas sem permissões (somente administrador)', + params = { + reason = { name = 'motivo', help = 'Motivo do fechamento (opcional)' }, + }, + }, + car = { + help = 'Criar Veículo (somente administrador)', + params = { + model = { name = 'modelo', help = 'Modelo do veículo' }, + }, + }, + dv = { help = 'Excluir veículo (somente administrador)' }, + givemoney = { + help = 'Dar dinheiro a um jogador (somente administrador)', + params = { + id = { name = 'id', help = 'ID do jogador' }, + moneytype = { name = 'tipo_dinheiro', help = 'Tipo de dinheiro (cash, bank, crypto)' }, + amount = { name = 'quantia', help = 'Quantia de dinheiro' }, + }, + }, + setmoney = { + help = 'Definir a quantidade de dinheiro do jogador (somente administrador)', + params = { + id = { name = 'id', help = 'ID do jogador' }, + moneytype = { name = 'tipo_dinheiro', help = 'Tipo de dinheiro (cash, bank, crypto)' }, + amount = { name = 'quantia', help = 'Quantia de dinheiro' }, + }, + }, + job = { help = 'Verifique seu trabalho' }, + setjob = { + help = 'Definir o trabalho do jogador (somente administrador)', + params = { + id = { name = 'id', help = 'ID do jogador' }, + job = { name = 'trabalho', help = 'Nome do trabalho' }, + grade = { name = 'grau', help = 'Grau do trabalho' }, + }, + }, + gang = { help = 'Verifique sua gangue' }, + setgang = { + help = 'Definir a gangue do jogador (somente administrador)', + params = { + id = { name = 'id', help = 'ID do jogador' }, + gang = { name = 'gangue', help = 'Nome da gangue' }, + grade = { name = 'grau', help = 'Grau da gangue' }, + }, + }, + ooc = { help = 'Mensagem de bate-papo OOC' }, + me = { + help = 'Mostrar mensagem local', + params = { + message = { name = 'mensagem', help = 'Mensagem para enviar' } + }, + }, + }, } if GetConvar('qb_locale', 'en') == 'pt-br' then diff --git a/locale/th.lua b/locale/th.lua index f665d1f..43bca61 100644 --- a/locale/th.lua +++ b/locale/th.lua @@ -2,23 +2,124 @@ local Translations = { error = { not_online = 'ผู้เล่นไม่ออนไลน์', wrong_format = 'รูปแบบไม่ถูกต้อง', - missing_args = 'ไม่ได้ป้อนทุกอาร์กิวเมนต์ (x, y, z)', - missing_args2 = 'จะต้องกรอกอาร์กิวเมนต์ทั้งหมด', - no_access = 'ไม่มีสิทธิ์เข้าถึงคำสั่งนี้', - company_too_poor = 'ผู้ว่าจ้างของคุณยากจนมาก', - item_not_exist = 'ไม่มีรายการนี้', - too_heavy = 'สินค้าในคลังเต็มแล้ว' + missing_args = 'ตัวแปรที่ต้องการไม่ถูกกำหนด (x, y, z)', + missing_args2 = 'ต้องกำหนดตัวแปรทุกตัวให้ครบ!', + no_access = 'ไม่สามารถเข้าถึงคำสั่งนี้ได้', + company_too_poor = 'บริษัทของคุณกำลังจะล้มละลาย', + item_not_exist = 'ไม่มีไอเทมนี้', + too_heavy = 'กระเป๋าเต็มแล้ว', + location_not_exist = 'ไม่มีตำแหน่งนี้', + duplicate_license = 'พบใบอนุญาต Rockstar ซ้ำ', + no_valid_license = 'ไม่พบใบอนุญาต Rockstar ที่ถูกต้อง', + not_whitelisted = 'คุณไม่ได้รับอนุญาตให้เข้าใช้เซิร์ฟเวอร์นี้', + server_already_open = 'เซิร์ฟเวอร์ถูกเปิดแล้ว', + server_already_closed = 'เซิร์ฟเวอร์ถูกปิดแล้ว', + no_permission = 'คุณไม่ได้รับสิทธิ์ในการใช้คำสั่งนี้..', + no_waypoint = 'ไม่มีจุดเส้นทางที่ตั้ง', + tp_error = 'ข้อผิดพลาดขณะวาร์ป', + connecting_database_error = 'เกิดข้อผิดพลาดในการเชื่อมต่อกับเซิร์ฟเวอร์ (SQL server เปิดอยู่ไหม?)', + connecting_database_timeout = 'เชื่อมต่อกับฐานข้อมูลเกิด timeout (SQL server เปิดอยู่ไหม?' + }, + success = { + server_opened = 'เซิฟเวอร์เปิดแล้ว', + server_closed = 'เซิฟเวอร์เปิดแล้ว', + teleported_waypoint = 'เคลือนย้ายไปยังจุดหมาย.', }, - success = {}, info = { - received_paycheck = 'คุณได้รับเงินเดือนเป็นเงิน $%{value}', - job_info = 'อาชีพ: %{value} | ระดับ: %{value2} | อยู่ในหน้าที่: %{value3}', + received_paycheck = 'คุณได้รับเงินเดือน $%{value}', + job_info = 'อาชีพ: %{value} | ระดับ: %{value2} | กำลังปฏิบัติหน้าที่: %{value3}', gang_info = 'แก๊ง: %{value} | ระดับ: %{value2}', - on_duty = 'ตอนนี้คุณอยู่ในหน้าที่แล้ว', - off_duty = 'ตอนนี้คุณออกหน้าที่แล้ว' + on_duty = 'คุณเริ่มปฏิบัติหน้าที่แล้ว!', + off_duty = 'คุณออกจากการปฏิบัติหน้าที่แล้ว!', + checking_ban = 'สวัสดี %s. เรากำลังตรวจสอบสถานะการโดนแบนของคุณ.', + join_server = 'ยินดีต้อนรับ %s เข้าสู่ {Server Name}.', + checking_whitelisted = 'สัวสดี %s. เรากำลังเช็ค whitelisted ของคุณ.', + exploit_banned = 'คุณโดนแบนจากการโกง. เข้าร่วม Discord สำหรับข้อมูลเพิ่มเติม: %{discord}', + exploit_dropped = 'คุณโดนเตะออกจากเซิฟเวอร์ เนื่องจากเหตุผลเกี่ยวกับการใช้โปรแกรมโกง', + }, + command = { + tp = { + help = 'เคลือนย้ายไปยัง ผู้เล่น หรือ ตำแหน่งพิกัด (สำหรับ Admin)', + params = { + x = { name = 'id/x', help = 'ไอดีของผู้เล่น หรือ พิกัด x'}, + y = { name = 'y', help = 'พิกัด y'}, + z = { name = 'z', help = 'พิกัด z'}, + }, + }, + tpm = { help = 'เคลือนย้ายไปบังจุดมาร์ค (สำหรับ Admin)' }, + togglepvp = { help = 'เปิดใช้ pvp ในเซิฟเวอร์ (สำหรับ Admin)' }, + addpermission = { + help = 'ให้สิทธิ์กับผู้เล่น (สำหรับ God)', + params = { + id = { name = 'id', help = 'ไอดีของผู้เล่น' }, + permission = { name = 'permission', help = 'ระดับของสิทธิ์' }, + }, + }, + removepermission = { + help = 'ลบสิทธิ์ของผู้เล่น (สำหรับ God)', + params = { + id = { name = 'id', help = 'ID of player' }, + permission = { name = 'permission', help = 'ระดับของสิทธิ์' }, + }, + }, + openserver = { help = 'เปิดเซิฟเวอร์สำหรับทุกคน (สำหรับ Admin)' }, + closeserver = { + help = 'ปิดเซิฟเวอร์สำหรับทุกคนที่ไม่มีสิทธิ์การเข้าถึง (สำหรับ Admin)', + params = { + reason = { name = 'reason', help = 'เหตุผลที่ปิด (ถ้ามี)' }, + }, + }, + car = { + help = 'เรียกยานพาหนะ (สำหรับ Admin)', + params = { + model = { name = 'model', help = 'ชื่อของยานพาหนะ' }, + }, + }, + dv = { help = 'ลบยานพาหนะ (สำหรับ Admin)' }, + givemoney = { + help = 'ให้เงินกับผู้เล่น (สำหรับ Admin)', + params = { + id = { name = 'id', help = 'ไอดีของผู้เล่น' }, + moneytype = { name = 'moneytype', help = 'ประเภทของเงิน (เงินสด, เงินฝาก, คริปโต)' }, + amount = { name = 'amount', help = 'จำนวนเงิน' }, + }, + }, + setmoney = { + help = 'กำหนดจำนวนเงินของผู้เล่น (สำหรับ Admin)', + params = { + id = { name = 'id', help = 'ไอดีของผู้เล่น' }, + moneytype = { name = 'moneytype', help = 'ประเภทของเงิน (เงินสด, เงินฝาก, คริปโต)' }, + amount = { name = 'amount', help = 'จำนวนเงิน' }, + }, + }, + job = { help = 'ตรวจสอบอาชีพของคุณ' }, + setjob = { + help = 'กำหนดอาชีพของผู้เล่น (สำหรับ Admin)', + params = { + id = { name = 'id', help = 'ไอดีของผู้เล่น' }, + job = { name = 'job', help = 'ชื่ออาชีพ่' }, + grade = { name = 'grade', help = 'ระดับ' }, + }, + }, + gang = { help = 'ตรวจสอบแก๊งของคุณ' }, + setgang = { + help = 'กำหนดแก๊งของผู้เล่น (สำหรับ Admin)', + params = { + id = { name = 'id', help = 'ไอดีของผู้เล่น' }, + gang = { name = 'gang', help = 'ชื่อแก๊ง' }, + grade = { name = 'grade', help = 'ระดับ' }, + }, + }, + ooc = { help = 'ข้อความ OOC' }, + me = { + help = 'แสดงข้อความใกล้เขียง', + params = { + message = { name = 'message', help = 'ข้อความที่จะส่ง' } + }, + }, } } - + if GetConvar('qb_locale', 'en') == 'th' then Lang = Locale:new({ phrases = Translations, diff --git a/server/commands.lua b/server/commands.lua index e240da7..499c7c1 100644 --- a/server/commands.lua +++ b/server/commands.lua @@ -244,7 +244,6 @@ QBCore.Commands.Add('setgang', Lang:t("command.setgang.help"), { { name = Lang:t end, 'admin') -- Out of Character Chat - QBCore.Commands.Add('ooc', Lang:t("command.ooc.help"), {}, false, function(source, args) local message = table.concat(args, ' ') local Players = QBCore.Functions.GetPlayers() @@ -253,22 +252,22 @@ QBCore.Commands.Add('ooc', Lang:t("command.ooc.help"), {}, false, function(sourc for _, v in pairs(Players) do if v == source then TriggerClientEvent('chat:addMessage', v, { - color = { 0, 0, 255}, + color = QBConfig.Commands.OOCColor, multiline = true, args = {'OOC | '.. GetPlayerName(source), message} }) elseif #(playerCoords - GetEntityCoords(GetPlayerPed(v))) < 20.0 then TriggerClientEvent('chat:addMessage', v, { - color = { 0, 0, 255}, + color = QBConfig.Commands.OOCColor, multiline = true, args = {'OOC | '.. GetPlayerName(source), message} }) elseif QBCore.Functions.HasPermission(v, 'admin') then if QBCore.Functions.IsOptin(v) then TriggerClientEvent('chat:addMessage', v, { - color = { 0, 0, 255}, + color = QBConfig.Commands.OOCColor, multiline = true, - args = {'Proxmity OOC | '.. GetPlayerName(source), message} + args = {'Proximity OOC | '.. GetPlayerName(source), message} }) TriggerEvent('qb-log:server:CreateLog', 'ooc', 'OOC', 'white', '**' .. GetPlayerName(source) .. '** (CitizenID: ' .. Player.PlayerData.citizenid .. ' | ID: ' .. source .. ') **Message:** ' .. message, false) end diff --git a/server/debug.lua b/server/debug.lua index ecfba64..056c1ff 100644 --- a/server/debug.lua +++ b/server/debug.lua @@ -25,15 +25,14 @@ local function tPrint(tbl, indent) end end -RegisterServerEvent('QBCore:DebugSomething', function(tbl, indent) - local resource = GetInvokingResource() or "qb-core" +RegisterServerEvent('QBCore:DebugSomething', function(tbl, indent, resource) print(('\x1b[4m\x1b[36m[ %s : DEBUG]\x1b[0m'):format(resource)) tPrint(tbl, indent) print('\x1b[4m\x1b[36m[ END DEBUG ]\x1b[0m') end) function QBCore.Debug(tbl, indent) - TriggerEvent('QBCore:DebugSomething', tbl, indent) + TriggerEvent('QBCore:DebugSomething', tbl, indent, GetInvokingResource() or "qb-core") end function QBCore.ShowError(resource, msg)