mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Weapon attachment rework
This commit is contained in:
+9
-9
@@ -3,25 +3,25 @@ local function tPrint(tbl, indent)
|
||||
if type(tbl) == 'table' then
|
||||
for k, v in pairs(tbl) do
|
||||
local tblType = type(v)
|
||||
local formatting = ("%s ^3%s:^0"):format(string.rep(" ", indent), k)
|
||||
local formatting = ('%s ^3%s:^0'):format(string.rep(' ', indent), k)
|
||||
|
||||
if tblType == "table" then
|
||||
if tblType == 'table' then
|
||||
print(formatting)
|
||||
tPrint(v, indent + 1)
|
||||
elseif tblType == 'boolean' then
|
||||
print(("%s^1 %s ^0"):format(formatting, v))
|
||||
elseif tblType == "function" then
|
||||
print(("%s^9 %s ^0"):format(formatting, v))
|
||||
print(('%s^1 %s ^0'):format(formatting, v))
|
||||
elseif tblType == 'function' then
|
||||
print(('%s^9 %s ^0'):format(formatting, v))
|
||||
elseif tblType == 'number' then
|
||||
print(("%s^5 %s ^0"):format(formatting, v))
|
||||
print(('%s^5 %s ^0'):format(formatting, v))
|
||||
elseif tblType == 'string' then
|
||||
print(("%s ^2'%s' ^0"):format(formatting, v))
|
||||
else
|
||||
print(("%s^2 %s ^0"):format(formatting, v))
|
||||
print(('%s^2 %s ^0'):format(formatting, v))
|
||||
end
|
||||
end
|
||||
else
|
||||
print(("%s ^0%s"):format(string.rep(" ", indent), tbl))
|
||||
print(('%s ^0%s'):format(string.rep(' ', indent), tbl))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -32,7 +32,7 @@ RegisterServerEvent('QBCore:DebugSomething', function(tbl, indent, resource)
|
||||
end)
|
||||
|
||||
function QBCore.Debug(tbl, indent)
|
||||
TriggerEvent('QBCore:DebugSomething', tbl, indent, GetInvokingResource() or "qb-core")
|
||||
TriggerEvent('QBCore:DebugSomething', tbl, indent, GetInvokingResource() or 'qb-core')
|
||||
end
|
||||
|
||||
function QBCore.ShowError(resource, msg)
|
||||
|
||||
Reference in New Issue
Block a user