mirror of
https://github.com/etlegacy/etlegacy-lua-scripts.git
synced 2025-02-16 17:01:52 +00:00
Fixed xpsave loop for small amount of players with bots
This commit is contained in:
parent
9577b173a2
commit
74e5c86092
1 changed files with 6 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
|||
--[[
|
||||
Author: Jan Šimek [Radegast]
|
||||
Contributors: Kewin Polok [Sheldar]
|
||||
License: MIT
|
||||
Released on 23.11.2013
|
||||
Website: http://www.etlegacy.com
|
||||
|
@ -10,7 +11,7 @@
|
|||
]]--
|
||||
|
||||
-- Lua module version
|
||||
local version = "0.2"
|
||||
local version = "0.3"
|
||||
|
||||
-- load sqlite driver (or mysql..)
|
||||
local luasql = require "luasql.sqlite3"
|
||||
|
@ -148,10 +149,11 @@ function et_ShutdownGame(restart)
|
|||
-- iterate through clients and save their XP
|
||||
while cno < maxclients do
|
||||
local cs = et.trap_GetConfigstring(tonumber(et.CS_PLAYERS) + cno)
|
||||
|
||||
if cs and cs ~= "" then
|
||||
saveXP(cno)
|
||||
end
|
||||
|
||||
if not cs or cs == "" then break end
|
||||
|
||||
saveXP(cno)
|
||||
cno = cno + 1
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue