Files
community_bridge/use/prints.lua
T
MrNewb 92f6d42555 0.0.10
Aligned folder names with table names for most parts. Temporarily removed unfinished ox_core compatibility. Added missing tables to init.lua, updated manifest to reflect new folder names, and incremented version number.
2025-01-09 03:55:10 -05:00

25 lines
527 B
Lua

Prints = {}
local function printMessage(level, color, message)
if type(message) == 'table' then
message = json.encode(message)
end
print(color .. '[' .. level .. ']:', message)
end
Prints.Info = function(message)
printMessage('INFO', '^5', message)
end
Prints.Warn = function(message)
printMessage('WARN', '^3', message)
end
Prints.Error = function(message)
printMessage('ERROR', '^1', message)
end
Prints.Debug = function(message)
printMessage('DEBUG', '^2', message)
end
return Prints