samp.directory
← Skrypty i biblioteki

ufteers/samp-query-info

💾 NodeJS script for obtaining public information about SA-MP server.

Narzędzie★ 9zaktualizowano wrz 2018UnlicenseJavaScriptZarchiwizowane
Otwórz na GitHubie

Autor zarchiwizował to repozytorium, więc nie jest już rozwijane.

README.md

💾 NodeJS script for obtaining public information about SA-MP server.

Usage

Get all info about server
getServerInfo("127.0.0.1", 7777, function(error, response)
{
    console.log(response);
});

Instead of IP, you can also use the URL. As example server.sa-mp.com.

Sample response
{
  passworded: false,
  players: 1,
  maxplayers: 10,
  servername: 'SA-MP Unofficial server',
  gamemodename: 'freeroam',
  language: 'English',
  properties:
  { 
     artwork: 'Yes',
     lagcomp: 'On',
     mapname: 'San Andreas',
     version: '0.3.DL-R1',
     weather: '7',
     weburl: 'sa-mp.com',
     worldtime: '00:00' 
  },
  playerlist:
  [
      { id: 0, name: 'ufteers', score: 1, ping: 11 }
  ]
}
Other functions
getServerProperties(...)
getServerOnline(...)
getServerMaxPlayers(...)
getServerName(...)
getServerGamemodeName(...)
getServerLanguage(...)
getServerVersion(...)
getServerWeather(...)
getServerWebSite(...)
getServerWorldTime(...)
getServerPlayers(...)
getServerPlayersDetailed(...)
getServerPing(...)

Soon

  • Add support for cyrillic letters in texts

nodejssa-mpsa-mp-server

Ta strona jest zbudowana z tego, co GitHub publikuje o repozytorium. samp.directory nie hostuje kodu. Zgłoś problem z tym wpisem

ufteers/samp-query-info: Narzędzie SA-MP | samp.directory