transporttycoon
TypeScript icon, indicating that this package has built-in type declarations

1.2.8 • Public • Published

TT-API

A wrapper for the FiveM server, Transport Tycoon

NPM page

npm install transporttycoon

Features:

  • Handles servers being down, will attempt to find the next available server
  • Implements many (if not all) API routes that are known
  • Auto-completion for a lot of returned data (although many return arrays, so sometimes not as useful)
  • Keeps track of charges, can get how many charges are left

Usage:

const { TransportTycoon } = require('transporttycoon');

(async () => {
  const TT = new TransportTycoon('API KEY', true);
  await TT.setupCharges();
  const economy = await TT.getEconomyInfo();
  console.log(economy);
})();

setupCharges() should only be called if the second parameter of the constructor is true (trackCharges)

Package Sidebar

Install

npm i transporttycoon

Weekly Downloads

0

Version

1.2.8

License

ISC

Unpacked Size

28.6 kB

Total Files

34

Last publish

Collaborators

  • sadboilogan