1.5.5 • Published 3 years ago

vu-rcon v1.5.5

Weekly downloads
33
License
MIT
Repository
-
Last release
3 years ago

Battlefield 3 RCON Interface

npm

Example

import { Battlefield } from "./src/Battlefield"

Battlefield.connect({ 
  host: "127.0.0.1",
  port: 47200,
  password: "RCON_PASSWORD"
}).then(async bf3 => {

  //listen to different events
  bf3.on("playerJoin", ({ name }) => bf3.say(`${name} is joining the game...`))
  bf3.on("playerLeave", event => console.log({ event }))
  bf3.on("kill", ({ killed, weapon }) => killed.say(`You just got killed with ${weapon.name}`))

  //get a list of players and yell the name to them
  const players = await bf3.getPlayers()
  players.forEach(player => player.yell(`Hello ${player.name}`))

  //ban someone
  const player = bf3.getPlayerByName("foobar")
  await player.banGuid().reason("foo").permanent().send()

})
1.5.5

3 years ago

1.5.4

3 years ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.10

3 years ago

1.3.9

3 years ago

1.3.7

3 years ago

1.3.8

3 years ago

1.3.6

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.9

3 years ago

1.2.10

3 years ago

1.2.11

3 years ago

1.2.8

3 years ago

1.2.7

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago