File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { InSim } from 'node-insim' ;
2- import type { IS_BTC } from 'node-insim/packets' ;
2+ import type { InSimPacketInstance , PacketType } from 'node-insim/packets' ;
33import { IS_MST , MessageSound } from 'node-insim/packets' ;
44import {
55 Button ,
@@ -18,7 +18,8 @@ export function PlayersAndConnectionsExample() {
1818 const { sendMessageToConnection, sendMessageToPlayer } = useInSim ( ) ;
1919
2020 const handlePlayerClick =
21- ( PLID : number ) => ( packet : IS_BTC , inSim : InSim ) => {
21+ ( PLID : number ) =>
22+ ( packet : InSimPacketInstance < PacketType . ISP_BTC > , inSim : InSim ) => {
2223 inSim . send ( new IS_MST ( { Msg : `/echo PLID ${ PLID } ` } ) ) ;
2324 sendRaceControlMessageToConnection (
2425 packet . UCID ,
@@ -44,7 +45,8 @@ export function PlayersAndConnectionsExample() {
4445 } ;
4546
4647 const handleConnectionClick =
47- ( UCID : number ) => ( packet : IS_BTC , inSim : InSim ) => {
48+ ( UCID : number ) =>
49+ ( packet : InSimPacketInstance < PacketType . ISP_BTC > , inSim : InSim ) => {
4850 inSim . send ( new IS_MST ( { Msg : `/echo UCID ${ UCID } ` } ) ) ;
4951 sendRaceControlMessageToConnection (
5052 packet . UCID ,
You can’t perform that action at this time.
0 commit comments