1.7.33 • Published 3 years ago

@nativewrappers/client v1.7.33

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Notice for breaking changes

This library is going to be undergoing a rewrite over the next few months, backwards compatibility will not be guaranteed, if you want version thats guaranteed stable please look use 1.7.*

This is a continuation of fivem-js, who's maintainer has sadly passed away.

This project is in no way affiliated with FiveM or the Cfx Collective.

Functionality of this wrapper is based on the FiveM C# wrapper - link. It's a feature-rich set of helper classes, objects, and functions to help you develop your project faster.

Features

  • No runtime dependencies
  • Abstracts common used FiveM practices
  • Entity management through class objects (i.e. Vehicle and Ped entities)
  • UI elements such as scaleforms and loading prompts
  • Audio, Blips, Cameras and more...

In other words, whatever the FiveM C# wrapper can do, this package can as well and more!

Download & Install

yarn add @nativewrappers/client

or

npm i @nativewrappers/client

https://www.npmjs.com/package/@nativewrappers/client

Simple Usage

See here for example projects.

Typescript

import * as Cfx from '@nativewrappers/client';

RegisterCommand(
  'adder',
  async (source: number, args: string[]) => {
    const vehicle = await Cfx.World.createVehicle(
      new Cfx.Model('adder'),
      new Cfx.Vector3(1, 2, 3),
      4,
    );
    Cfx.Game.PlayerPed.setIntoVehicle(vehicle, Cfx.VehicleSeat.Driver);
  },
  false,
);

You can also individually import classes.

import { World } from '@nativewrappers/client/lib/World';

Javascript

/// <reference path="node_modules/@nativewrappers/client/lib/index.d.ts"/>
/// <reference path="node_modules/@citizenfx/client/natives_universal.d.ts"/>

const Cfx = require('@nativewrappers/client');

RegisterCommand(
  'adder',
  async (source, args) => {
    const vehicle = await Cfx.World.createVehicle(
      new Cfx.Model('adder'),
      new Cfx.Vector3(1, 2, 3),
      4,
    );
    Cfx.Game.PlayerPed.setIntoVehicle(vehicle, Cfx.VehicleSeat.Driver);
  },
  false,
);

Contributing

You are more than welcome to contribute to this project by submitting a pull request and creating issues.

Please checkout CONTRIBUTING.md for our contributing guidelines.

License

MIT with customization. See LICENSE

1.7.27

3 years ago

1.7.28

3 years ago

1.7.27-rc1

3 years ago

1.7.29

3 years ago

1.7.30

3 years ago

1.7.31

3 years ago

1.7.32

3 years ago

1.7.33

3 years ago

1.7.26

3 years ago

1.7.25

3 years ago

1.7.16

3 years ago

1.7.17

3 years ago

1.7.18

3 years ago

1.7.19

3 years ago

1.7.20

3 years ago

1.7.21

3 years ago

1.7.22

3 years ago

1.7.23

3 years ago

1.7.24

3 years ago

1.7.12

3 years ago

1.7.14

3 years ago

1.7.15

3 years ago

1.7.6

3 years ago

1.7.5

3 years ago

1.7.4

3 years ago

1.7.3

3 years ago

1.7.0

3 years ago

1.7.1

3 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.40

3 years ago

1.5.45

3 years ago

1.5.44

3 years ago

1.5.47

3 years ago

1.5.46

3 years ago

1.5.49

3 years ago

1.5.48

3 years ago

1.5.30

4 years ago

1.5.32

4 years ago

1.5.31

4 years ago

1.5.34

4 years ago

1.5.33

4 years ago

1.5.36

4 years ago

1.5.35

4 years ago

1.5.38

3 years ago

1.5.37

4 years ago

1.5.25

4 years ago

1.4.34

4 years ago

1.5.27

4 years ago

1.5.26

4 years ago

1.5.29

4 years ago

1.5.28

4 years ago

1.5.24

4 years ago

1.5.23

4 years ago

1.5.22

4 years ago

1.5.21

4 years ago

1.5.20

4 years ago

1.5.19

4 years ago

1.5.18

4 years ago

1.5.17

4 years ago

1.5.16

4 years ago

1.5.15

4 years ago

1.5.14

4 years ago

1.5.13

4 years ago

1.5.12

4 years ago

1.5.11

4 years ago

1.5.10

4 years ago

1.5.9

4 years ago

1.5.7

4 years ago

1.5.6

4 years ago

2.0.0-beta

4 years ago

1.5.5

4 years ago

1.5.4

4 years ago