alt.offClient

Used to stop listening to built-in events from the client. Meaning that this turns off a function where a client triggers a server-side event.

Declaration

alt.offClient(eventName: string, listener: (...args: any[]) => void): void

Usage

alt.offClient('someEvent', someCallbackFunction);

Real World Example

function someCallbackFunction(player, someArg) {
    console.log(`${player.name} has called this function.`);
    alt.offClient('someEvent', someCallbackFunction);
}

alt.onClient('someEvent', someCallbackFunction);

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

results matching ""

    No results matching ""