• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

AAC ZnoteAAC serverstatus bug

icekis

Member
Joined
Jan 18, 2018
Messages
91
Reaction score
5
I'm using ZnoteAAC on my server with the metroblue template.

In serverstatus widget shows my server with 60 players online being actually 28, and every time I refresh the page serv save countdown restart.

Can anybody help me?
 

Attachments

You probably have duplicate records in znote_players, there should only be one row for each player_id column value.
(edit): Or is it an issue with old distro and flags/outfit display? What is your configured server engine? Do you have outfits/flags enabled?
 
🤔 How does your players_online table look like? (And how many rows do you have here)?
What layout are you using?
 
What do you get when doing this query?
SQL:
SELECT COUNT(*) FROM `players_online`
 
Is that correct, do you have 100 players online?

Do you have any player_ids in that table that is not online?
Could be a crash on your OT server or something, so players are added to that table that isn't online anymore.

I'm gonna presume you have player_ids here that arent actually online.

To clear this table on startup (although you should probably look into why there are rows here that shouldn't be here, like an ondeath or onkill script that crashes or something)

You can add this to data/globalevents/globalevents.xml:
XML:
<globalevent type="startup" name="ClearOnlineTable" script="clearOnlineTable.lua" />

And this to data/globalevents/scripts/clearOnlineTable.lua:
Lua:
function onStartup()
    db.asyncQuery("DELETE FROM `players_online`;")
    print("Cleared online table.")
end
 
Last edited:
Is that correct, do you have 100 players online?

Do you have any player_ids in that table that is not online?
Could be a crash on your OT server or something, so players are added to that table that isn't online anymore.

I'm gonna presume you have player_ids here that arent actually online.

To clear this table on startup (although you should probably look into why there are rows here that shouldn't be here, like an ondeath or onkill script that crashes or something)

You can add this to data/globalevents/globalevents.xml:
XML:
<globalevent type="startup" name="ClearOnlineTable" script="clearOnlineTable.lua" />

And this to data/globalevents/scripts/clearOnlineTable.lua:
Lua:
function onStartup()
    db.asyncQuery("DELETE FROM `players_online`;")
    print("Cleared online table.")
end

I have this code in my creturescripts>scripts>login.lua

Lua:
db.query('INSERT INTO `players_online` (`player_id`) VALUES (' .. playerId .. ')')
 
Back
Top