Jump to page content
English English   Polish Polish   Dutch Dutch   Russian Russian   German German   Hungarian Hungarian   Norwegian Norwegian   Swedish Swedish   Finnish Finnish   Romanian Romanian   Spanish Spanish   Portuguese Portuguese   Latvian Latvian  
Homepage
Home
Register
Login

Resources
Forum
Wiki
Servers

rssserverinfo (serverinfo)

Category:script
Author(s):IIYAMA12
Downloads:426
Rate:You need to be logged in to vote
Rating:5 (1 Vote)
Description:
This resource allows you to fetch ingame data from your server in JSON format. Like player count, players ingame, generic info, basic chat history.

For the installation, read the readme please! Set limited rights for the account that access the API is very important.


After setting everything correct up (and making sure your MTA web interface is accessible):
<ip>:<port>/<resourceName>/api/<endpointName>.json

Get generic server info:
http://127.0.0.1:22005/serverinfo/api/info.json

Get the players:
http://127.0.0.1:22005/serverinfo/api/playerList.json

Get the teams:
http://127.0.0.1:22005/serverinfo/api/teamList.json

Analytics data of the last 24 hours
http://127.0.0.1:22005/serverinfo/api/analytics.json

Get latest 50 chat messages:
http://127.0.0.1:22005/serverinfo/api/chat.json

Feel free to modify or expand to your liking!
...

(more)

Download latest version | Report

Version history

Version Publish Date Changes
1.1.3 2022-10-30 13:32:09 - Fixing auto installation
- Moved ID of the chat endpoint to the correct location
Download
1.1.2 2022-10-29 18:23:34 changed incorrect readme info Download
1.1.1 2022-10-29 17:58:09 Fixed resource name Download
1.1.0 2022-10-29 17:45:35 First public release Download