dobrograd-13-06-2022/garrysmod/addons/admin-logs/lua/octologs/sv_log.lua
Jonny_Bro (Nikita) e4d5311906 first commit
2023-11-16 15:01:19 +05:00

28 lines
362 B
Lua

local Log = {}
Log.__index = Log
function octologs.createLog(category)
local log = {}
log.parts = {}
log.category = category
return setmetatable(log, Log)
end
function Log:Add(...)
local parts = self.parts
for i, v in ipairs({...}) do
parts[#parts + 1] = v
end
return self
end
function Log:Save()
octologs.log(self.parts, self.category)
end