alt.hasResource

Used to determine if a resource is currently loaded by the server.

Returns a boolean. (true / false)

Declaration

alt.hasResource(name: string): boolean

Usage

alt.hasResource('someResource');

Real World Example

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

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

results matching ""

    No results matching ""