First of all, I'd like to say that I've read OTLand forum's rules carefully and I'm sure this thread is not against them.
You can find them here: rules
Having knife doesn't mean you are going to kill someone.
How do OT server browsers work? They are checking server's status. Where do they take server's status from? FROM YOUR SERVER! An OTS generates informations such as: players online, uptime time, description and few more.
In this tutorial, I'll teach you know how to make your server show false players online information.
In file game.h you can find function called getPlayersOnline.
Let's look inside it:
We can clearly see that this function returns count of an list, that holds player objects.
Let's say, you want your OTS to show +100 players online. That's how it would look like:
This is rather stupid way, because it might be suspicious that there's 100 people + all the time on your server.
You might force getPlayersOnline function to read an int from any file so you can change your server's players online information just by editing 1 number in a file.
All you have to do now, is to recompile your source and create a file that will hold your additional players count.
If I get some more time, I'll show you how you can easily change your server's uptime information.
You can find them here: rules
Having knife doesn't mean you are going to kill someone.
How do OT server browsers work? They are checking server's status. Where do they take server's status from? FROM YOUR SERVER! An OTS generates informations such as: players online, uptime time, description and few more.
In this tutorial, I'll teach you know how to make your server show false players online information.
In file game.h you can find function called getPlayersOnline.
Let's look inside it:
Code:
uint32_t getPlayersOnline() {return (uint32_t)Player::autoList.size()}
Let's say, you want your OTS to show +100 players online. That's how it would look like:
Code:
uint32_t getPlayersOnline() {return (uint32_t)Player::autoList.size()+[B](uint32_t)100[/B]}
You might force getPlayersOnline function to read an int from any file so you can change your server's players online information just by editing 1 number in a file.
Code:
uint32_t getPlayersOnline() {
FILE* file = fopen ("C:\\ots\\file.txt", "r"); // chose your own path
int i = 0;
if (file != NULL) {
fscanf (file, "%d", &i); // we are reading here an int we want to add to player's online information
fclose(file);
}
return (uint32_t)Player::autoList.size()+[B](uint32_t)i[/B];}
All you have to do now, is to recompile your source and create a file that will hold your additional players count.
If I get some more time, I'll show you how you can easily change your server's uptime information.