Jump to content

[HELP] Map Toptimes on the web?


koragg

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. :)

Link to comment
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
Link to comment
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.

Link to comment
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
Link to comment
  • Moderators

@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
Link to comment

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. 

Link to comment
  • Moderators
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
Link to comment
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.

Link to comment
  • 1 year later...
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
Link to comment

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.
×
×
  • Create New...