- rpc generics
- some internal types to expose from rpc
This commit is contained in:
2024-10-03 23:11:39 +01:00
parent f8dd4d9fce
commit 67be91538b
8 changed files with 110 additions and 50 deletions
+2 -2
View File
@@ -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'])