Jump to content
Sign in to follow this  
Genesis

EverythingRS Players Online [ANY BASE]

Recommended Posts

EverythingRS - Players Online Tutorial

EverythingRS is a free API system. Here's a quick tutorial on how to get started with adding Players Online.

Getting started

  • First off download our everythingrs-api.jar from

    Please login or register to see this link.

    and include it into your project.
  • Also register an account at

    Please login or register to see this link.

  • Remember your secret key as you will be using it in the next section

 fWlKyhh.png


Making the Players Online work with your server

This part of the tutorial is for PI, but can easily be changed to work with any server. If you want me to add a snippet on the thread so it can work with your framework leave a comment with the server base you want the snippet for.

In your server startup (Server.java) under

Please login or register to see this code.

Add this and change your secret key to the one on your account

Please login or register to see this code.

Displaying your player count on your website

In your index.php place this where ever you wish to display your player count. Remember to change the secret key.

Please login or register to see this code.


            
Fin

You are finished with the tutorial and can now view your player count on your site ^^

Info and some documentation

Player count will update every 30 seconds. If you wish to make calls every 30 minutes just change the 5 to 30 (or to whichever number you wish) and TimeUnit.SECONDS to TimeUnit.MINUTES in the startup code. If you wish to make direct changes to the way the code works, this section will help out.

To fetch the current players online you can use this code

Please login or register to see this code.

To set the count to whatever you wish use this code

Please login or register to see this code.

To add to the playercount use this

Please login or register to see this code.

To subtract from the playercount use this

Please login or register to see this code.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×