- Joined
- Jun 10, 2009
- Messages
- 659
- Reaction score
- 141
I want to show the list of all players who are currently playing in my server on my website. Is there some way I get it from server and show?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature currently requires accessing the site using the built-in Safari browser.
You can count all the "online users" from the db.
The easiest way to do this is to just grab the web releases here and see how it was done.
Note that you can also put "online users" by "maps/zones".
Example:
Total Online: 10
Mandara: 5
Shambala: 5
you need to make players online php code direct on database
'## CHAR NAME / ID
Dim char1 = ReadLong(HTLauncher, &H10055978, 4) + &H0
Dim charX = "&H" & Hex(char1)
'string charName
Dim myASCIIStringValue As String = ReadMemory(Of String)(charX, 50, False)
lblCharName.Text = myASCIIStringValue
Ive updated my post above.
We have never tried Listing the player's name in our ranking while we have our server online back then because we found it a hassle and serves no real purpose.
However, I can understand that you seek uniqueness in this and I dont see a problem with that.
The #2 option I talked about is how I made my Macro for Tantra Surya.
It gets the Player Name via Memory Reading.
You can do the same, read the Player Name from Memory and also its location.
And then Write it back to your php script using Post method or you can directly write it into your custom database for the online ranking.Code:'## CHAR NAME / ID Dim char1 = ReadLong(HTLauncher, &H10055978, 4) + &H0 Dim charX = "&H" & Hex(char1) 'string charName Dim myASCIIStringValue As String = ReadMemory(Of String)(charX, 50, False) lblCharName.Text = myASCIIStringValue
With Method #2 you can also record the players Map / Zone his X / Y / Z location.
And you can make your DLL update this live (memory intensive and bandwidth intensive probably) or set it with intervals.
Now if you are planning to build a custom database using MySQL, its a lot simpler.
You can use MySQL connector to set your application to talk to your Sql server.
When your application detects the player is in game, it will update the sql database with its value (Player name, Map, X/Y/Z).
And when it it detects the player is offline or client is close, it will delete the record from your database.
You see, by just doing that alone is a lot of work and pain in the butt and serves little purpose.
That's why its not being prioritize when we were actively developing our custom server.
If you're going to read the log file, then thats more tedious dont you think?
You have to cycle through all the log files inside the log folder and process each files with RegEx to find your string?
Or Im over thinking again?
Since you are a pro in Php, I really encourage you to look into the gamelogin.php and enhance that from there.
And that will also probably solve in multi-client instances in 1 pc.
As it will record per account who logged in.
Good luck if you're using the anti-cheat that was attached with the released client (whom other server uses).
That can be easily bypassed.
You have an online server now that we can take a look / play?
I could care less who develops who or who develops what to be honest.