Timer problem
#1

FIXED! - I rewrote the code.
Reply
#2

Important Note: The function that should be called, must be public, meaning it has to be forwarded.
Reply
#3

Changed it to a public but still doesn't save them.
Reply
#4

You really don't need to save it frequently. Only save data when player disconnects which occurs on OnPlayerDisconnect callback.
Reply
#5

It saves OnPlayerDisconnect, but if the server crashes or some kind of problem occurs that causes OnPlayerDisconnect not to be called all the player stats will be lost - although the timer doesn't necessarily need to be every 13 seconds.
Reply
#6

pawn Код:
forward SaveAccounts();
public SaveAccounts()
{
    foreach(Player, i)
    {
        if(Logged[i] == 1)
        {
            SaveAccountStats(i);
        }
    }
}
Try that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)