go-steam
go-steam copied to clipboard
Gamecordinator csgo send ECsgoGCMsg = 9156 but steam not respond anyhing
Hello! I have trouble with GC When i send this request
client.GC.Write(gamecoordinator.NewGCMsgProtobuf(
730,
uint32(protobuf.ECsgoGCMsg_k_EMsgGCCStrike15_v2_Client2GCEconPreviewDataBlockRequest),
&payload,
))
I dont get any response from steam
I Register the handler for client.GC but nothing appear after my request
type Handler struct{}
func (g *Handler) HandleGCPacket(p *gamecoordinator.GCPacket) {
fmt.Println("HandleGCPacket")
if p.AppId == 730 {
switch p.MsgType {
case uint32(protobuf.ECsgoGCMsg_k_EMsgGCCStrike15_v2_Client2GCEconPreviewDataBlockResponse):
var res protobuf.CMsgGCCStrike15V2_Client2GCEconPreviewDataBlockResponse
err := proto.Unmarshal(p.Body, &res)
if err != nil {
panic(err)
}
fmt.Println( res.Iteminfo.GetPaintwear())
}
}
}
// ...
client.GC.RegisterPacketHandler(&Handler{})
And please provide examples of GC usage
Hello! I'm not familiar with this library yet, but I'm dealing with the same problem. After connecting and successfully authenticating, you need to indicate to the client that you are in the game.
var appID uint64 = 730
gp := protobuf.CMsgClientGamesPlayed{GamesPlayed: []*protobuf.CMsgClientGamesPlayed_GamePlayed{{GameId: &appID}}}
client.Write(protocol.NewClientMsgProtobuf(steamlang.EMsg_ClientGamesPlayed, &gp))
After that, you can send messages to the gс by writing the running game id to the app_id field, and wait for a response