samp.directory
← Skrypty i biblioteki

GalassoX/samp-rcon.js

Rcon Client for SA:MP servers

Narzędzie★ 2zaktualizowano lis 2022Brak licencjiJavaScript
Otwórz na GitHubie

To repozytorium nie ma pliku licencji. Jest publiczne do odczytu, ale samo to nie daje pozwolenia na ponowne użycie.

README.md

samp-rcon.js

Rcon Client for SA:MP servers

npm install samp-rcon.js

API

  • SampClient

    properties
    • ip: string = { get; set; };
    • password: string = { get; set; };
    • port: number = { get; set; };

SampClient(ip: string, port: number)

Constuctor

.executeCommand(command: string)

Execute Rcon command to the server

Returns: Promise<string>

.getInfo()

Get the server info

Returns: Promise<Object>

{
    passworded: boolean;
    players: number;
    maxplayers: number;
    hostname: string;
    gamemode: string;
    mapname: string;
}

.getUsers()

Get all users connected

Returns: Promise<Object[]>

{
    id: number;
    name: string;
    score: number;
    ping: number;
}[]

.getServerRules()

Get server rules (the gravity, weather, the website URL...)

Return: Promise<Object>

{
    [Server rules that you defined]: value
}

rconrcon-clientsamp

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

GalassoX/samp-rcon.js: Narzędzie SA-MP | samp.directory