Archived
upd
- rpc generics - some internal types to expose from rpc
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { rpc } from 'rpc'
|
||||
|
||||
rpc.register('playerJoin', async player => {
|
||||
rpc.register('playerJoin', async (player: PlayerMp) => {
|
||||
console.log(`Connected: ${player.socialClub}`)
|
||||
})
|
||||
|
||||
rpc.register('customServerEvent', (player, data) => {
|
||||
rpc.register('customServerEvent', (player: PlayerMp, data) => {
|
||||
console.log(player, data)
|
||||
|
||||
rpc.callClient(player, 'customClientEvent', ['server to client'])
|
||||
|
||||
Reference in New Issue
Block a user