mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Fix QBCore.Debug not printing correct invoking resource name
This commit is contained in:
+2
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user