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 ​
Name | Type |
---|---|
T | any |
Parameters ​
Name | Type |
---|---|
eventName | string |
callback | (...args : any []) => T |
Returns ​
void