best-samp-query

1.1.1ย โ€ขย Publicย โ€ขย Published

๐Ÿ“ฆ best-samp-query

Simplified Query API for SAMP: Efficient and easy retrieval of information from the server ๐Ÿ”ฅ

๐Ÿ’พ Installation

npm install best-samp-query

๐Ÿ“‹ Options

  • host โ€” Required
  • port โ€” Default: 7777 โ€” Optional
  • timeout โ€” Default: 1000 โ€” Optional

๐ŸŽ Code example

const Query = require("best-samp-query");
const Options = {
    host: "135.148.89.12",
    port: 7777,
    timeout: 1000
};
Query(Options)
    .catch(console.error)
    .then(console.log);

๐ŸŽ Sample output

{
  online: 11,
  address: "135.148.89.12",
  port: 7777,
  hostname: ".:( PuroDesmadre V ):.  [ DM ] + [ FreeRoam ]",
  gamemode: "Dm/FreeRoam/Derby",
  mapname: "Espaัol/Latino",
  passworded: false,
  maxplayers: 50,
  rules: {
    lagcomp: false,
    mapname: "San Andreas",
    version: "0.3.7-R2",
    weather: 10,
    weburl: "discord.gg/BjUGcpcYUt",
    worldtime: "12:00"
  },
  players: [
    { id: 0, name: "Neiikos", score: 323, ping: 101 },
    { id: 1, name: "vorTeX", score: 2359, ping: 163 },
    { id: 2, name: "Kis4Me", score: 1000822, ping: 157 },
    { id: 3, name: "Benjamin_Otero", score: 0, ping: 202 },
    { id: 4, name: "Oier_Millan", score: 4340, ping: 102 },
    { id: 6, name: ".Gs.Ahm6d6l6.Vl", score: 1729246, ping: 127 },
    { id: 7, name: "Canserbero.Tss", score: 1512, ping: 280 },
    { id: 8, name: "cumtrol", score: 267, ping: 66 },
    { id: 10, name: "benja_guerrero", score: 11, ping: 224 },
    { id: 12, name: "pato_pinuer", score: 30, ping: 178 },
    { id: 14, name: "zoom_saaaa", score: 20110, ping: 137 }
  ]
}

Package Sidebar

Install

npm i best-samp-query

Weekly Downloads

11

Version

1.1.1

License

MIT

Unpacked Size

8.34 kB

Total Files

3

Last publish

Collaborators

  • daniscript18