I’m new here so I’m very sorry if I’ve posted this in the wrong section.
Okay, first things first. I am currently working on our new game launcher.
Let me quickly explain how it works; To prevent any cheating clients to connect to our gameserver, we have come up with an idea to set a bool to true whenever the player hits play on the launcher. Sadly we cannot directly access our database from the launcher so we make it run a php file. In this case: init_launcher.php?user=username
This will then run the game, and check if this is bool is true. If this bool is false, it means that the player has not connected using our client.
Now I have come up with this simple code:
$username = "NONE";
$username = $_GET[‘user’];
$username = $db->escapeString($username);
$sql = "UPDATE USERS SET LAUNCHER = 'true' WHERE USERNAME = '".$username."'"; $stmt = $db->query($sql);
However, the issue i’m facing is that I need a way to restore the bool to false after a certain amount of time. I wonder how I could realise this.
Any help would be appreciated.
Thanks in advance!
Kind regards, Jasper from UWRP.