1.2.0 • Published 3 months ago

cfx-api v1.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 months ago

Cfx.re JavaScript API

A package that helps you interacting with the Cfx.re, FiveM & RedM API.

How to install

npm i cfx-api

Example usage:

const cfx = require("cfx-api");

(async () => {
  // Retrieve a CitizenFX server (could be a FiveM or a RedM server)
  const server = await cfx.fetchServer("qrbm5v") // Replace "qrpm7v" with a server id
  console.log(`Server: ${server.hostname} has ${server.players.length} players online`);

  // Retrieve Cfx.re status
  const status = await cfx.fetchStatus()
  console.log(status.everythingOk ? "All Cfx.re systems are operational" : "Cfx.re is experiencing issues");

  // And get status of all individual components
  const components = await status.fetchComponents()
  for (let component of components)
    console.log(`${component.name}: ${component.status}`);
})();
1.2.0

3 months ago

1.1.0

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.122

2 years ago

1.0.121

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.1

2 years ago

1.0.0-alpha.2

2 years ago

1.0.0-alpha.1

2 years ago

1.0.0

2 years ago