0.1.5 • Published 2 years ago

better-samp-query v0.1.5

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

better-samp-query

Simplified Query API for SAMP with promises. Fork of node-samp-query

npm install better-samp-query

Usage

Available options

  • host
  • port - default: 7777
  • timeout - default: 1000
const query = require('better-samp-query')

const options = {
  host: '193.203.39.36',
}

query(options)
  .then((data) => {
    // do something with the data
  })
  .catch((e) => {
    // do something with the error
  })

Sample output

{
  "address": "193.203.39.36",
  "port": 7777,
  "hostname": "ruby.nephrite.ro - special quest - 2x PAYDAY",
  "gamemode": "nephrite, 18 Apr 2022 22:53:46",
  "mapname": "RO/EN",
  "passworded": false,
  "maxplayers": 1000,
  "online": 799,
  "rules": {
    "anticheat build": "Apr 18 2022",
    "language": "RO/EN",
    "mapname": "LS/LV/SF",
    "version": "0.3.7-R2 open.mp",
    "weburl": "nephrite.ro",
    "lagcomp": false,
    "weather": null
  },
  "players": []
}
0.1.5

2 years ago

0.1.4

2 years ago