esx.js
TypeScript icon, indicating that this package has built-in type declarations

1.1.8 • Public • Published

ESX.js

About

This is a JavaScript/TypeScript wrapper for the ESX (es_extended) framework in FiveM.

If you experience any issues, please post them in the Issues.

Guide

Installation

Run npm i esx.js to install the package. When this is done you are ready to use it.

Usage

So how do you use it?

First you need to import either the Client class or Server class.

Client

import { Client } from 'esx.js'

let ESX: Client = null

setImmediate (() => {
  emit('esx:getSharedObject', (obj: Client) => (ESX = obj));
})

Server

import { Server } from 'esx.js'

let ESX: Server = null

emit('esx:getSharedObject', (obj: Server) => (ESX = obj));

You can also import a single type:

import { XPlayer } from 'esx.js/@types/server'

const Player: XPlayer

That's it. Now you are ready to rock the world!

Package Sidebar

Install

npm i esx.js

Weekly Downloads

8

Version

1.1.8

License

MIT

Unpacked Size

33.1 kB

Total Files

6

Last publish

Collaborators

  • itschip