static unsafe void OnGameConnectedClanChatMessage(GameConnectedClanChatMsg_t data) { if (OnClanChatMessage == null) { return; } var friend = new Friend(data.SteamIDUser); var buffer = Helpers.TakeMemory(); var type = ChatEntryType.ChatMsg; SteamId chatter = data.SteamIDUser; var len = Internal.GetClanChatMessage(data.SteamIDClanChat, data.MessageID, buffer, Helpers.MemoryBufferSize, ref type, ref chatter); if (len == 0 && type == ChatEntryType.Invalid) { return; } var typeName = type.ToString(); var message = Helpers.MemoryToString(buffer); OnClanChatMessage(data.SteamIDClanChat, friend, data.MessageID, typeName, message); }
void OnGameConnectedClanChatMsg(GameConnectedClanChatMsg_t pCallback) { Debug.Log("[" + GameConnectedClanChatMsg_t.k_iCallback + " - GameConnectedClanChatMsg] - " + pCallback.m_steamIDClanChat + " -- " + pCallback.m_steamIDUser + " -- " + pCallback.m_iMessageID); string Text; EChatEntryType ChatEntryType; CSteamID Chatter; int ret = SteamFriends.GetClanChatMessage(pCallback.m_steamIDClanChat, pCallback.m_iMessageID, out Text, 2048, out ChatEntryType, out Chatter); // Must be called from within OnGameConnectedClanChatMsg print(ret + " " + Chatter + ": " + Text); }