23.03.2016, 23:42
When do you insert that value in the database?
When the player is online or offline?
In case he's online, just kick him immediately instead of saving a 1 in the database and query it every second.
In case he's offline and should be kicked upon connecting, you can simply read the value during OnPlayerConnect and if it's a 1, kick him.
There is no need to run such a query every second per player.
When the player is online or offline?
In case he's online, just kick him immediately instead of saving a 1 in the database and query it every second.
In case he's offline and should be kicked upon connecting, you can simply read the value during OnPlayerConnect and if it's a 1, kick him.
There is no need to run such a query every second per player.