Skip to content

itschip/esx.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

A JavaScript/TypeScript wrapper for ESX (es_extended) framework in FiveM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •