alt.getResourcePath

Gets the full resource path on server-side.

Useful when using dynamic imports when __dirname is not available.

Returns a string.

Declaration

alt.getResourcePath(name: string): string

Usage

alt.getResourcePath('someResource');

Real World Example

const resource = alt.getResourcePath('someResource');
if (resource) {
    alt.log(resource);
}

These examples assume you have imported alt from alt-server.

results matching ""

    No results matching ""