open-index/open-npm huggingface dataset:
npm package: @risinglife/fivem-client
Description: This package contains the type definitions for the FiveM JS module shared types
Latest version: 0.3.5

# FiveM Client Types

This package contains "easy-to-use" types for FiveM.

For example:
```js
import * as client from '@risinglife/fivem-client';

client.shutdownLoadingScreenNui();
```

For native access see [this package](https://www.npmjs.com/package/@risinglife/fivem-natives)<br>
You can see all functions, and how they can be use at [https://nativedb.dotindustries.dev/gta5/natives/](https://nativedb.dotindustries.dev/gta5/natives/)<br>
The package must be included when compile the code for example with **esbuild**.

### Since v0.2.0
All root methods (e.g. `client.shutdownLoadingScreenNui()`) were removed.
The reason for this is clearly that namespaced methods are better and clearer.

If you want them, you must switch to version [0.1.1-legacy](https://www.npmjs.com/package/@risinglife/fivem-client/v/0.1.1-legacy)

### Looking for a bundled variant?
Install the package [@risinglife/fivem-client-bundled](https://www.npmjs.com/package/@risinglife/fivem-client-bundled) to have both the client and Game Natives directly in one package.

This package will also be kept up to date, just like the standalone packages.

### Contribute

As this package content is being generated from a json file, we do not accept direct pull requests.
If you have issues, please create a [Issue](https://github.com/RisingLifeDE/types-fivem/issues/new)

### Credits

Thanks to [alloc8or](https://github.com/alloc8or/gta5-nativedb-data) and [CFX.re](https://cfx.re)
npm package: @risinglife/fivem-client-bundled
Description: This package contains the type definitions for the FiveM JS module shared types
Latest version: 0.3.6

# FiveM Client Bundled Types

This package contains "easy-to-use" types for FiveM.

For example:
```js
import * as client from '@risinglife/fivem-client-bundled';

// Shut down the loading screen
client.nui.shutdownLoadingScreen();

// Create an ped
client.ped.create(2, 'MP_M_Freemode_01', new client.Vector3(0, 0, 0), 0, false, false);
```

### Usage
You can use [https://nativedb.dotindustries.dev/gta5/natives/](https://nativedb.dotindustries.dev/gta5/natives/) or [https://docs.fivem.net/natives/](https://docs.fivem.net/natives/) to look how you can use methods.

The only difference is that the package uses “namespaces” instead of “root methods.”
This gives us the advantage of having clearly structured functions.

This package contains both native and client methods for FiveM.

### Other packages
- https://www.npmjs.com/package/@risinglife/fivem-client
- https://www.npmjs.com/package/@risinglife/fivem-natives
- https://www.npmjs.com/package/@risinglife/fivem-server
- https://www.npmjs.com/package/@risinglife/fivem-webview
- https://www.npmjs.com/package/@risinglife/fivem-shared

### Contribute

As this package content is being generated from a json file, we do not accept direct pull requests.
If you have issues, please create a [Issue](https://github.com/RisingLifeDE/types-fivem/issues/new)

### Credits

Thanks to [alloc8or](https://github.com/alloc8or/gta5-nativedb-data) and [CFX.re](https://cfx.re)
npm package: @risinglife/fivem-natives
Description: This package contains the type definitions for the FiveM JS module shared types
Latest version: 0.3.6

# FiveM Native/Game Types

This package contains "easy-to-use" types for FiveM.

### Example usage
```js
import * as game from '@risinglife/fivem-natives';

game.scripts.shutdownLoadingScreen();
```

### Since v0.2.0
All root methods (e.g. `game.playerId()`) were removed.
The reason for this is clearly that namespaced methods are better and clearer.

If you want them, you must downgrade to version [0.1.16](https://www.npmjs.com/package/@risinglife/fivem-natives/v/0.1.16)
Remind: Only the latest version contains the newest natives.

### Information

For client access see [this package](https://www.npmjs.com/package/@risinglife/fivem-client)<br>
You can see all functions, and how they can be use at [https://nativedb.dotindustries.dev/gta5/natives/](https://nativedb.dotindustries.dev/gta5/natives/)<br>
The package must be included when compile the code for example with **esbuild**.

### Contribute

As this package content is being generated from a json file, we do not accept direct pull requests.
If you have issues, please create a [Issue](https://github.com/RisingLifeDE/types-fivem/issues/new)

### Credits

Thanks to [alloc8or](https://github.com/alloc8or/gta5-nativedb-data) and [CFX.re](https://cfx.re)
npm package: @risinglife/fivem-server
Description: This package contains the type definitions for the FiveM JS module shared types
Latest version: 0.3.5

# FiveM Server Types

This package contains "easy-to-use" types for FiveM.

It contains every method which can be used on server side.

For client access see [this package](https://www.npmjs.com/package/@risinglife/fivem-client)<br>
The package must be included when compile the code for example with **esbuild**.

### Since v0.2.0
All root methods (e.g. `server.taskShootAtEntity()`) were removed.
The reason for this is clearly that namespaced methods are better and clearer.

If you want them, you must switch to version [0.1.1-legacy](https://www.npmjs.com/package/@risinglife/fivem-server/v/0.1.1-legacy)

### Contribute

As this package content is being generated from a json file, we do not accept direct pull requests.
If you have issues, please create a [Issue](https://github.com/RisingLifeDE/types-fivem/issues/new)

### Credits

Thanks to [alloc8or](https://github.com/alloc8or/gta5-nativedb-data) and [CFX.re](https://cfx.re)
npm package: @risinglife/fivem-shared
Description: This package contains the type definitions for the FiveM JS module shared types
Latest version: 0.0.9

# FiveM Shared Data

This package contains shared data for all types.
It is required by all types for the data.

Types:
- [Client](https://www.npmjs.com/package/@risinglife/fivem-client)
- [Game/Natives](https://www.npmjs.com/package/@risinglife/fivem-natives)
- [Server](https://www.npmjs.com/package/@risinglife/fivem-server)
npm package: @risinglife/fivem-webview
Description: This package is an easy-to-use solution for FiveM NUI listener/sender
Latest version: 0.0.1

# FiveM NUI Event-Helper

This package contains an helpful code to listen to events (and sending them to the client-script) easier.

### Usage
As this package helps only on NUI side, you have to register an global listener for this.
To make it easier, you should use EventEmitter to make more events with it.

To listen to any NUI:
```ts
client.registerNuiCallback('view-event', (data: any, cb: Function) => {
    cb('ok');

    if (!Array.isArray(data) || data.length < 2) {
        return;
    }

    const [viewIdentifier, eventName, ...args] = data;

    // Your code
});
```

Listener with event emitter (to have multiple "sub listener"):
```ts
class EventEmitter {
    private listeners: Map<string, Array<(...args: any[]) => void>> = new Map();

    on(eventName: string, callback: (...args: any[]) => void): void {
        if (!this.listeners.has(eventName)) {
            this.listeners.set(eventName, []);
        }
        this.listeners.get(eventName)!.push(callback);
    }

    once(eventName: string, callback: (...args: any[]) => void): void {
        const onceWrapper = (...args: any[]) => {
            this.off(eventName, onceWrapper);
            callback(...args);
        };
        this.on(eventName, onceWrapper);
    }

    emit(eventName: string, ...args: any[]): void {
        const callbacks = this.listeners.get(eventName);
        if (callbacks) {
            callbacks.forEach((callback) => {
                try {
                    callback(...args);
                } catch (error) {
                    console.error(error)
                }
            });
        }
    }

    off(eventName: string, callback: (...args: any[]) => void): void {
        const callbacks = this.listeners.get(eventName);
        if (callbacks) {
            const index = callbacks.indexOf(callback);
            if (index !== -1) {
                callbacks.splice(index, 1);
            }
        }
    }

    removeAllListeners(eventName?: string): void {
        if (eventName) {
            this.listeners.delete(eventName);
        } else {
            this.listeners.clear();
        }
    }
}

const events = new EventEmitter();

client.registerNuiCallback('view-event', (data: any, cb: Function) => {
    cb('ok');

    if (!Array.isArray(data) || data.length < 2) {
        // console.warn('Invalid event data received:', data);
        return;
    }

    const [viewIdentifier, eventName, ...args] = data;
    events.emit(`${viewIdentifier}::${eventName}`, ...args);
});
```
npm package: @risinglife/redm-client-bundled
Description: This package contains the type definitions for the RedM JS module shared types
Latest version: 0.2.2

# RedM Client Bundled Types

This package contains "easy-to-use" types for RedM.

For example:
```js
import * as client from '@risinglife/redm-client-bundled';

// Shut down the loading screen
client.nui.shutdownLoadingScreen();

// Create an ped
client.ped.create(2, 'MP_M_Freemode_01', new client.Vector3(0, 0, 0), 0, false, false);
```

### Usage
You can use [https://nativedb.dotindustries.dev/rdr3/natives/](https://nativedb.dotindustries.dev/gta5/natives/) or [https://docs.fivem.net/natives/](https://docs.fivem.net/natives/) to look how you can use methods.

The only difference is that the package uses “namespaces” instead of “root methods.”
This gives us the advantage of having clearly structured functions.

This package contains both native and client methods for RedM.

### Other packages
- https://www.npmjs.com/package/@risinglife/redm-client
- https://www.npmjs.com/package/@risinglife/redm-natives
- https://www.npmjs.com/package/@risinglife/redm-server
- https://www.npmjs.com/package/@risinglife/redm-webview
- https://www.npmjs.com/package/@risinglife/redm-shared

### Contribute

As this package content is being generated from a json file, we do not accept direct pull requests.
If you have issues, please create a [Issue](https://github.com/RisingLifeDE/types-redm/issues/new)

### Credits

Thanks to [VORP Core](https://github.com/VORPCORE/RDR3natives) and [CFX.re](https://cfx.re)
npm package: @risinglife/redm-natives
Description: This package contains the type definitions for the RedM JS module shared types
Latest version: 0.2.5

# RedM Native/Game Types

This package contains "easy-to-use" types for RedM.

### Example usage
```js
import * as game from '@risinglife/redm-natives';

game.scripts.shutdownLoadingScreen();
```

### Since v0.2.0
All root methods (e.g. `game.playerId()`) were removed.
The reason for this is clearly that namespaced methods are better and clearer.

If you want them, you must downgrade to version [0.1.16](https://www.npmjs.com/package/@risinglife/redm-natives/v/0.1.16)
Remind: Only the latest version contains the newest natives.

### Information

For client access see [this package](https://www.npmjs.com/package/@risinglife/redm-client)<br>
You can see all functions, and how they can be use at [rdr3natives.com/](https://rdr3natives.com/)<br>
The package must be included when compile the code for example with **esbuild**.

### Contribute

As this package content is being generated from a json file, we do not accept direct pull requests.
If you have issues, please create a [Issue](https://github.com/RisingLifeDE/types-redm/issues/new)

### Credits

Thanks to [VORP Core](https://github.com/VORPCORE/RDR3natives) and [CFX.re](https://cfx.re)
npm package: @risinglife/redm-shared
Description: This package contains the type definitions for the RedM JS module shared types
Latest version: 0.0.8

# RedM Shared Data

This package contains shared data for all types.
It is required by all types for the data.

Types:
- [Client](https://www.npmjs.com/package/@risinglife/redm-client)
- [Game/Natives](https://www.npmjs.com/package/@risinglife/redm-natives)
- [Server](https://www.npmjs.com/package/@risinglife/redm-server)

### Contribute

As this package content is being generated from a json file, we do not accept direct pull requests.
If you have issues, please create a [Issue](https://github.com/RisingLifeDE/types-redm/issues/new)

### Credits

Thanks to [VORP Core](https://github.com/VORPCORE/RDR3natives) and [CFX.re](https://cfx.re)
npm package: @risinglife/redm-webview
Description: This package is an easy-to-use solution for RedM NUI listener/sender
Latest version: 0.0.1

# FiveM NUI Event-Helper

This package contains an helpful code to listen to events (and sending them to the client-script) easier.

### Usage
As this package helps only on NUI side, you have to register an global listener for this.
To make it easier, you should use EventEmitter to make more events with it.

To listen to any NUI:
```ts
client.registerNuiCallback('view-event', (data: any, cb: Function) => {
    cb('ok');

    if (!Array.isArray(data) || data.length < 2) {
        return;
    }

    const [viewIdentifier, eventName, ...args] = data;

    // Your code
});
```

Listener with event emitter (to have multiple "sub listener"):
```ts
class EventEmitter {
    private listeners: Map<string, Array<(...args: any[]) => void>> = new Map();

    on(eventName: string, callback: (...args: any[]) => void): void {
        if (!this.listeners.has(eventName)) {
            this.listeners.set(eventName, []);
        }
        this.listeners.get(eventName)!.push(callback);
    }

    once(eventName: string, callback: (...args: any[]) => void): void {
        const onceWrapper = (...args: any[]) => {
            this.off(eventName, onceWrapper);
            callback(...args);
        };
        this.on(eventName, onceWrapper);
    }

    emit(eventName: string, ...args: any[]): void {
        const callbacks = this.listeners.get(eventName);
        if (callbacks) {
            callbacks.forEach((callback) => {
                try {
                    callback(...args);
                } catch (error) {
                    console.error(error)
                }
            });
        }
    }

    off(eventName: string, callback: (...args: any[]) => void): void {
        const callbacks = this.listeners.get(eventName);
        if (callbacks) {
            const index = callbacks.indexOf(callback);
            if (index !== -1) {
                callbacks.splice(index, 1);
            }
        }
    }

    removeAllListeners(eventName?: string): void {
        if (eventName) {
            this.listeners.delete(eventName);
        } else {
            this.listeners.clear();
        }
    }
}

const events = new EventEmitter();

client.registerNuiCallback('view-event', (data: any, cb: Function) => {
    cb('ok');

    if (!Array.isArray(data) || data.length < 2) {
        // console.warn('Invalid event data received:', data);
        return;
    }

    const [viewIdentifier, eventName, ...args] = data;
    events.emit(`${viewIdentifier}::${eventName}`, ...args);
});
```
npm package: @risingmedia/fivem-client
Description: This package contains the type definitions for the FiveM JS module shared types
Latest version: 0.0.1

# FiveM Client Types

This package contains "easy-to-use" types for FiveM.

For example:
```js
import * as client from '@risinglife/fivem-client';

client.shutdownLoadingScreenNui();
```

For native access see [this package](https://www.npmjs.com/package/@risinglife/fivem-natives)<br>
You can see all functions, and how they can be use at [https://docs.fivem.net/natives/](https://docs.fivem.net/natives/)<br>
The package must be included when compile the code for example with **esbuild**.
npm package: @risingmedia/fivem-natives
Description: This package contains the type definitions for the FiveM JS module shared types
Latest version: 0.0.1

# FiveM Native/Game Types

This package contains "easy-to-use" types for FiveM.

For example:
```js
import * as game from '@risinglife/fivem-natives';

game.shutdownLoadingScreen();
```

For client access see [this package](https://www.npmjs.com/package/@risinglife/fivem-client)<br>
You can see all functions, and how they can be use at [https://docs.fivem.net/natives/](https://docs.fivem.net/natives/)<br>
The package must be included when compile the code for example with **esbuild**.
npm package: @risingmedia/fivem-server
Description: This package contains the type definitions for the FiveM JS module shared types
Latest version: 0.0.1

# FiveM Server Types

This package contains "easy-to-use" types for FiveM.

It contains every method which can be used on server side.

For client access see [this package](https://www.npmjs.com/package/@risinglife/fivem-client)<br>
You can see all functions, and how they can be use at [https://docs.fivem.net/natives/](https://docs.fivem.net/natives/)<br>
The package must be included when compile the code for example with **esbuild**.