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.


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


alt.offClient('someEvent', someCallbackFunction);

Real World Example

function someCallbackFunction(player, someArg) {
    console.log(`${} 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 ""