diff --git a/luascripts/commands/admin/listlevels.lua b/luascripts/commands/admin/listlevels.lua index 8aea8c7..c6e7a64 100644 --- a/luascripts/commands/admin/listlevels.lua +++ b/luascripts/commands/admin/listlevels.lua @@ -89,7 +89,7 @@ function commandListLevels(clientId, cmdArguments) else et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dLevels for ^7"..et.gentity_get(cmdClient, "pers.netname").."^d:\";") for id, level in pairs(levels) do - et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^f"..string.format("%4s", level["id"]).." ^7"..string.format("%-20s", util.removeColors(db.getlastalias(level["admin_id"])["alias"])).." ^f"..os.date("%d/%m/%Y", level["datetime"]).." ^7"..level["level_id"].."\";") + et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^f"..string.format("%4s", level["id"]).." ^7"..string.format("%-20s", util.removeColors(db.getlastalias(level["invoker_id"])["alias"])).." ^f"..os.date("%d/%m/%Y", level["datetime"]).." ^7"..level["level_id"].."\";") end et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^9Showing results ^7"..(offset + 1).." ^9- ^7"..limit.." ^9of ^7"..count.."^9.\";") diff --git a/luascripts/db/sqlite3.lua b/luascripts/db/sqlite3.lua index 1e798ea..82da0b6 100644 --- a/luascripts/db/sqlite3.lua +++ b/luascripts/db/sqlite3.lua @@ -172,8 +172,8 @@ function sqlite3.getlastalias(playerid) end -- level history -function sqlite3.addsetlevel(playerid, level, adminid, datetime) - cur = assert(con:execute("INSERT INTO `player_level` (`player_id`, `level_id`, `admin_id`, `datetime`) VALUES ("..tonumber(playerid)..", "..tonumber(level)..", "..tonumber(adminid)..", "..tonumber(datetime)..")")) +function sqlite3.addsetlevel(playerid, level, invokerid, datetime) + cur = assert(con:execute("INSERT INTO `player_level` (`player_id`, `level_id`, `invoker_id`, `datetime`) VALUES ("..tonumber(playerid)..", "..tonumber(level)..", "..tonumber(invokerid)..", "..tonumber(datetime)..")")) end function sqlite3.getlevelscount(playerid)