1.0.0 • Published 8 months ago

samp-utils v1.0.0

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
8 months ago
📖 References

Install 📦

# using npm
npm i samp-utils
# using yarn
yarn add samp-utils
# using pnpm
pnpm add samp-utils

Usage 🔧

Check all available modules in 📖 References.

import {SampQuery} from 'samp-utils';

const query = new SampQuery({
  host: 'samp.sr.team',
  port: 1337
});

const main = async () => {
  const info = await query.getServerInfo();
  console.log(`server=${info.gameModeName}, players=${info.players}/${info.maxPlayers}`);
  // output: server=Prime-Hack CheatAllowing, players=1/10
};

main().catch(console.error);