A simple Node.js module to fetch and display information from SA-MP (San Andreas Multiplayer) servers.
npm install sampinfoque
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: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();
- Ensure that the server URL is accessible and correctly formatted.
- The module retrieves real-time information, so server status may vary.
If you encounter issues while fetching server information:
- Verify that the server URL is correct.
- Check if the server is running and accessible.
- Make sure your network connection is stable.
Feel free to open issues or submit pull requests for improvements and bug fixes!