samp-rcon.js
v1.0.0
Published
Rcon Client for SA:MP servers
Downloads
7
Readme
samp-rcon.js
Rcon Client for SA:MP servers
npm install samp-rcon.js
API
SampClient
- 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
}