zomboid-rcon-js
v1.2.0
Published
Zomboid Rcon Client
Downloads
7
Readme
Сlass with RCON commands Project Zomboid
Install
npm i --save zomboid-rcon-js
Example Use:
import { ZomboidRconClient } from 'zomboid-rcon-js';
const client = new ZomboidRconClient({
// ... rcon options
});
await client.connect();
const players = await client.onlinePlayers();
for(const player of players)
{
await client.serverMessage(`Hello, ${player}`);
}
await client.disconnect();
Supported Commands:
Give an item to a player.
client.addItem('username', 'Base.Axe', 1);
Add user.
client.addUser('username', 'password');
Give experience points to a player.
client.addXp('username', 'Axe', 1000);
Spawn a vehicle.
client.addVehicle('username', 'Base.Van');
Sound a building alarm at the Admin's position. (Must be in a room.)
client.alarm();
Ban a SteamID.
client.banSteamId('steamId');
Ban a user.
client.banUser('username', {
reason: 'reason',
ip: true
});
Place gunshot sounds on a random player.
client.gunshot();
Make a player invisible to zombies.
client.invisible('username', true);
Kick a user.
client.kickUser('username', 'reason');
Makes a player pass through walls and structures
client.noclip('username', true);
Saves the current game world
client.save();
Broadcast a message to all connected players.
client.serverMessage('message');
Set access level of a player.
client.setAccessLevel('username', 'gm');
Unban a SteamID.
client.unBanId('steamId');
Unban a player.
client.unBanUser('username');
Block voice from user
client.voiceBan('username', true);
List all connected players
client.onlinePlayers();