Skip to content

A simple and efficient package to fetch and parse SA-MP server information.

Notifications You must be signed in to change notification settings

Anit-K-Peter/sampinfoque

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SAMP INFO QUE NPM PACKAGE

A simple Node.js module to fetch and display information from SA-MP (San Andreas Multiplayer) servers.

📦 Installation

npm install sampinfoque

📋 Step-by-Step Guide To Get URL

To use the sampinfoque npm package, you need a valid serverInfoUrl from GS4u.net. Follow the steps below to obtain this URL:

Step 1: Visit GS4u.net Go to [GS4u.net](https://www.gs4u.net), a platform that provides SA-MP server listings.
Step 2: Search for Your Server 1. Use the search bar on the homepage to find your SA-MP server. 2. Type your server's name, IP address, or keywords to locate it.
Step 3: Open Your Server's Details Page 1. From the search results, click on your server listing. 2. This will open the server details page showing information such as player count, hostname, game mode, and more.
Step 4: Copy the Page URL 1. Once you're on the server details page, copy the URL from your browser's address bar. 2. This URL is your `serverInfoUrl`. It should look something like this:

Usage server.js

const SampInfo = require('sampinfoque');

const samp = new SampInfo({
    serverInfoUrl: 'https://www.gs4u.net/en/s/80410.html',
});

const start = async () => {
    const data = await samp.fetchServerInfo();
    console.log(data);
}

start();

Output

📝 Notes

  • Ensure that the server URL is accessible and correctly formatted.
  • The module retrieves real-time information, so server status may vary.

🛠️ Troubleshooting

If you encounter issues while fetching server information:

  1. Verify that the server URL is correct.
  2. Check if the server is running and accessible.
  3. Make sure your network connection is stable.

🤝 Contributing

Feel free to open issues or submit pull requests for improvements and bug fixes!

About

A simple and efficient package to fetch and parse SA-MP server information.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published