koragg

[HELP] Map Toptimes on the web?

Recommended Posts

Hey guys,

Today I added my server's scoreboard to my website and decided to finally ask the question I'm about to.

How to create something similar to this http://www.fullysik.net/index.php?page=53 ?

Is there some tutorial of some kind, someone who can help me make it or actually share such a page if already made?

It looks awesome and it's the last piece of the puzzle for me: IRC Chat is there, connected to the in-game one; now also added the scoreboard too & only map toptimes are left to make the integration complete (for me it will be, my server doesn't use site accounts for logins but I don't want that so it's fine).

Any help is appreciated. I know how to add Tabs and so on to SMF since today so the only problem is creating the actual page and making it work. :)

Share this post


Link to post
6 minutes ago, koragg said:

Hey guys,

Today I added my server's scoreboard to my website and decided to finally ask the question I'm about to.

How to create something similar to this http://www.fullysik.net/index.php?page=53 ?

Is there some tutorial of some kind, someone who can help me make it or actually share such a page if already made?

It looks awesome and it's the last piece of the puzzle for me: IRC Chat is there, connected to the in-game one; now also added the scoreboard too & only map toptimes are left to make the integration complete (for me it will be, my server doesn't use site accounts for logins but I don't want that so it's fine).

Any help is appreciated. I know how to add Tabs and so on to SMF since today so the only problem is creating the actual page and making it work. :)

You need a database on the web. I do not have much experience doing that with MTA, but it's the only thing I know

Share this post


Link to post
36 minutes ago, AncienT said:

You need a database on the web. I do not have much experience doing that with MTA, but it's the only thing I know

Well map toptimes get saved in a SQLite database by default. Shouldn't that work? If the server is online, means the database is also on the web.

Share this post


Link to post
2 minutes ago, koragg said:

Well map toptimes get saved in a SQLite database by default. Shouldn't that work? If the server is online, means the database is also on the web. 

I use https://www.phpmyadmin.net/
4 minutes ago, koragg said:

Well map toptimes get saved in a SQLite database by default. Shouldn't that work? If the server is online, means the database is also on the web. 

https://wiki.multitheftauto.com/wiki/DbQuery

  • Like 1

Share this post


Link to post

@koragg

Remember, your database is already in use by your server. If external parties can request data from it, this can overuse your database in case of spam requests.

If it is going to be used a lot, then I recommend to make 2 API's.

  • 1 PHP on your MTA server.
  • 1 Nodejs, on a server of choice.

 

Benefits/extra's/how to use:

  • The Nodejs server will request the scoreboard once in a while. (For buffer purposes)
  • On the PHP side you can set states to check if there are updates in the data, it is recommended but not required.
  • The website(for client requesters) that you are going to use, can be a part of Node or even hosted at a different server of choice.
  • (Your MTA server can send messages to your Note server to tell that the scoreboard is updated, if you want quick updates on your endpoint for your clients.)
  • Using a Nodejs server can protect your server from spam requests and buffer the data in the memory.
  • It also gives you access to sockets. (for live updates)

 

 

Edited by IIYAMA
  • Like 1

Share this post


Link to post

That's some advanced stuff @IIYAMA:D

I don't think that many people will spam the web toptimes as my server is more of a personal one and only a few people know about it. 

But my biggest problem is that I have no idea how to start doing the web tops page.

I guess I'd prefer using javascript as that's how the web scoreboard is made and can maybe reference things from it, dunno. 

Share this post


Link to post
3 hours ago, koragg said:

That's some advanced stuff @IIYAMA:D

I don't think that many people will spam the web toptimes as my server is more of a personal one and only a few people know about it. 

But my biggest problem is that I have no idea how to start doing the web tops page.

I guess I'd prefer using javascript as that's how the web scoreboard is made and can maybe reference things from it, dunno. 

Yes it is advanced stuff, for if you have a lot of players.

 

How about you give this first a try?

  • Thanks 1

Share this post


Link to post
On 02/02/2019 at 00:35, IIYAMA said:

Yes it is advanced stuff, for if you have a lot of players.

 

How about you give this first a try?

Thanks to those links I made another thing I wanted :D

http://193.200.241.6:22015/cr_webinfo/

And integrated it in my site, looks cool: http://www.classicracing.ml/index.php

Will continue with toptimes later on.

Share this post


Link to post
32 minutes ago, IIYAMA said:

Btw your update speed is a bit too fast.

It's 1 second :o

  • Like 1

Share this post


Link to post
1 hour ago, koragg said:

It's 1 second :o

You can easily update it every 3 seconds, nobody that notice much of a difference. Except for the ice bears. 🤣

  • Haha 1

Share this post


Link to post
18 hours ago, koragg said:

It's funny how easy this was now after having learned JavaScript, HTML and CSS along with SQL more intensively for the past year. Made a working script for a few hours and finished it in a few days. Here's my web toptimes viewer: https://community.multitheftauto.com/index.php?p=resources&s=details&id=18065 :)

Thank you for coming back to this forum and sharing the results of your work/research! :) I wish more people would do this kind of thing.

  • Like 1

Share this post


Link to post

Just updated it and it should work perfect now ;)

Share this post


Link to post

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

  • Recently Browsing   0 members

    No registered users viewing this page.