lua: (xpsave) fix for full servers

This commit is contained in:
Radegast 2013-12-22 22:42:28 +01:00
parent 560a2c8b88
commit 34d3c9b97c
2 changed files with 7 additions and 8 deletions

View file

@ -5,7 +5,7 @@ Lua scripts for the Legacy mod
## CONSTANTS ## CONSTANTS
** Scipts with useful constants for custom scripts * Scripts with useful constants for custom scripts
## dynamite ## dynamite
@ -15,9 +15,7 @@ Lua scripts for the Legacy mod
## xpsave ## xpsave
*In development and not intended to be used for public servers yet* * This script is intended for Legacy mod, but may work in NoQuarter 1.2.9 and above
* luasql module with sqlite3 driver is required
* This script is intended for Legacy mod, but may work in NoQuarter too * the script could be tweaked to use file backend or other database drivers instead of sqlite3
* luasql module with sqlite3 driver is required, but other database drivers may be used instead with a small change
* it could be tweaked to use file backend instead

View file

@ -141,9 +141,10 @@ end -- et_InitGame
function et_ShutdownGame(restart) function et_ShutdownGame(restart)
local cno = 0 local cno = 0
local maxclients = tonumber(et.trap_Cvar_Get("sv_maxclients"))
-- iterate through clients and save their XP -- iterate through clients and save their XP
while true do while cno < maxclients do
local cs = et.trap_GetConfigstring(et.CS_PLAYERS + cno) local cs = et.trap_GetConfigstring(et.CS_PLAYERS + cno)
if not cs or cs == "" then break end if not cs or cs == "" then break end