Skip to content
On this page

AthenaClient.systems.rpc

Functions

on

Usage

AthenaClient.systems.rpc.on<T>(eventName, callback): void

Handle an RPC event from server-side, and return a result back to the server.

The RPC event must be invoked from server-side through the Athena.systems.rpc.invoke function.

Example

ts
AthenaClient.systems.rpc.on('returnPlayerLocalPosition', () => {
     return alt.Player.local.pos;
})

Export

Type parameters

NameType
Tany

Parameters

NameType
eventNamestring
callback(...args: any[]) => T

Returns

void

Defined in

client/systems/rpc.ts:20

Created by Stuyk | Est. 2020