Vice City: Multiplayer

Server Development => Scripting and Server Management => Snippet Showroom => Topic started by: umar4911 on Aug 20, 2020, 05:37 PM

Title: [Gamedig] VCMP Activity Monitor
Post by: umar4911 on Aug 20, 2020, 05:37 PM
VCMP Server Monitor

Even though it is easy to write the packets but I found this very cool npm library which shortens your work. It returns the all the server information so complete credits to the contributors of the library.


GameDig - Game Server Query Library

All the information about this library is present in it's GitHub Repository.

Link: https://github.com/gamedig/node-gamedig

Note: This library is not specifically for vcmp.


Example

I created a sample script using which you can get the information of a server in JSON. I deployed it on Heroku.

Replace ip and port with the server's Ip and port
https://vcmp-info.herokuapp.com/ip/port


Click here to get server information of LW (http://vcmp-info.herokuapp.com/91.121.134.5/8192)


Click here to get server information of VKs (https://vcmp-info.herokuapp.com/51.38.93.130/8194)


The source code is present in my Github Repository (https://github.com/newhere491/vcmp-server-info/).

Example of the JSON code:
{
  "msg": "success",
  "state": {
    "name": "VKs official server [VRocker hosting]",
    "map": "",
    "password": false,
    "raw": {
      "version": "04rel006",
      "numplayers": 12,
      "gamemode": "United CA Mode v5.4.1",
      "map": "Vice City"
    },
    "maxplayers": 50,
    "players": [
      {
        "name": "=KF=SHy^LT"
      },
      {
        "name": "[RT]Martyrdom"
      },
      {
        "name": "[RT]ShadowJacK."
      },
      {
        "name": "[F2]MK14"
      },
      {
        "name": "=SdS=SupeR^DaviD*"
      },
      {
        "name": "[WSt]Jhanders"
      },
      {
        "name": "KeNgAhMeD2008"
      },
      {
        "name": "[KFt]Sos^"
      },
      {
        "name": "Jocoka"
      },
      {
        "name": "HUSSIENPRO"
      },
      {
        "name": "Jezza^++"
      },
      {
        "name": "Todor03"
      }
    ],
    "bots": [],
    "connect": "51.38.93.130:8194",
    "ping": 12
  }
}


Title: Re: [Gamedig] VCMP Activity Monitor
Post by: SHy^ on Aug 20, 2020, 06:10 PM
That's my boi, stated my name at top! Great work :D
P.S: The first link to link server IP is not working ::)
Title: Re: [Gamedig] VCMP Activity Monitor
Post by: umar4911 on Aug 20, 2020, 06:13 PM
Quote from: SHy^ on Aug 20, 2020, 06:10 PMThat's my boi, stated my name at top! Great work :D
P.S: The first link to link server IP is not working ::)
I mentioned:
Replace ip and port with the server's Ip and port like of EAD, the server's IP and port is: 51.255.102.249:8192. Use:
https://vcmp-info.herokuapp.com/51.255.102.249/8192
Title: Re: [Gamedig] VCMP Activity Monitor
Post by: SHy^ on Aug 21, 2020, 09:17 AM
Ops, my bad.. Thanks!