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
.
Run npm i esx.js
to install the package. When this is done you are ready to use it.
So how do you use it?
First you need to import either the Client
class or Server
class.
import { Client } from 'esx.js'
let ESX: Client = null
emit('esx:getSharedObject', (obj: Client) => (ESX = obj));
import { Server } from 'esx.js'
let ESX: Server = null
emit('esx:getSharedObject', (obj: Server) => (ESX = obj));