This is a JavaScript/TypeScript wrapper for the QBCore framework in FiveM, based on esx.js by itschip.
If you experience any issues, please post them in the Issues
.
Run npm i qbcore.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 'qbcore.js'
let QBCore: Client = exports['qb-core'].GetCoreObject()
import { Server } from 'qbcore.js'
let QBCore: Server = exports['qb-core'].GetCoreObject()
import { Player } from 'qbcore.js/@types/server'
const Player: Player