public static bool SetLobbyMemberLimit(int MaxMembers) { if (SteamCore.InOfflineMode()) { return(false); } //REMOVE//if ( s_CurrentLobby.m_handle == null ) return false; return(SteamMatchmaking.SetLobbyMemberLimit(s_CurrentLobby.m_handle, MaxMembers)); }
private void CreateSettingsMenu() { var settingsMenu = SettingsUI.CreateSubMenu(Plugin.instance.Name); var AutoStartLobby = settingsMenu.AddBool("Auto-Start Lobby", "Opens up a lobby when you launch the game"); AutoStartLobby.GetValue += delegate { return(Config.Instance.AutoStartLobby); }; AutoStartLobby.SetValue += delegate(bool value) { Config.Instance.AutoStartLobby = value; }; var IsPublic = settingsMenu.AddBool("Auto-Start Privacy", "Configures the privacy of lobbies that are auto-started"); IsPublic.DisabledText = "Friends Only"; IsPublic.EnabledText = "Public"; IsPublic.GetValue += delegate { return(Config.Instance.IsPublic); }; IsPublic.SetValue += delegate(bool value) { Config.Instance.IsPublic = value; }; var MaxLobbySite = settingsMenu.AddInt("Lobby Size", "Configure the amount of users you want to be able to join your lobby.", 2, 15, 1); MaxLobbySite.GetValue += delegate { return(Config.Instance.MaxLobbySize); }; MaxLobbySite.SetValue += delegate(int value) { SteamMatchmaking.SetLobbyMemberLimit(SteamAPI.getLobbyID(), value); Config.Instance.MaxLobbySize = value; }; var AvatarsInLobby = settingsMenu.AddBool("Enable Avatars In Lobby", "Turns avatars on for you in the waiting lobby"); AvatarsInLobby.GetValue += delegate { return(Config.Instance.AvatarsInLobby); }; AvatarsInLobby.SetValue += delegate(bool value) { Config.Instance.AvatarsInLobby = value; }; var AvatarsInGame = settingsMenu.AddBool("Enable Avatars In Game", "Turns avatars on for you while playing songs"); AvatarsInGame.GetValue += delegate { return(Config.Instance.AvatarsInGame); }; AvatarsInGame.SetValue += delegate(bool value) { Config.Instance.AvatarsInGame = value; }; var NetworkQuality = settingsMenu.AddInt("Network Quality", "Higher number, smoother avatar. Note that this effects how you appear to others. ", 0, 5, 1); NetworkQuality.GetValue += delegate { return(Config.Instance.NetworkQuality); }; NetworkQuality.SetValue += delegate(int value) { Config.Instance.NetworkQuality = value; if (Controllers.PlayerController.Instance.isBroadcasting) { Controllers.PlayerController.Instance.StopBroadcasting(); Controllers.PlayerController.Instance.StartBroadcasting(); } }; var NetworkScaling = settingsMenu.AddBool("Network Scaling", "Scales your network traffic based on the size of your lobby."); NetworkScaling.GetValue += delegate { return(Config.Instance.NetworkScaling); }; NetworkScaling.SetValue += delegate(bool value) { Config.Instance.NetworkScaling = value; }; }
public void RenderOnGUI() { GUILayout.BeginArea(new Rect(Screen.width - 200, 0, 200, Screen.height)); GUILayout.Label("Variables:"); GUILayout.Label("m_Lobby: " + m_Lobby); GUILayout.EndArea(); GUILayout.BeginVertical("box"); m_ScrollPos = GUILayout.BeginScrollView(m_ScrollPos, GUILayout.Width(Screen.width - 215), GUILayout.Height(Screen.height - 33)); GUILayout.Label("GetFavoriteGameCount() : " + SteamMatchmaking.GetFavoriteGameCount()); { AppId_t AppID; uint IP; ushort ConnPort; ushort QueryPort; uint Flags; uint LastPlayedOnServer; bool ret = SteamMatchmaking.GetFavoriteGame(0, out AppID, out IP, out ConnPort, out QueryPort, out Flags, out LastPlayedOnServer); GUILayout.Label("GetFavoriteGame(0, out AppID, out IP, out ConnPort, out QueryPort, out Flags, out LastPlayedOnServer) : " + ret + " -- " + AppID + " -- " + IP + " -- " + ConnPort + " -- " + QueryPort + " -- " + Flags + " -- " + LastPlayedOnServer); } if (GUILayout.Button("AddFavoriteGame(TestConstants.Instance.k_AppId_TeamFortress2, TestConstants.k_IpAddress208_78_165_233_uint, TestConstants.k_Port27015, TestConstants.k_Port27015, Constants.k_unFavoriteFlagFavorite, CurrentUnixTime)")) { uint CurrentUnixTime = (uint)(System.DateTime.UtcNow.Subtract(new System.DateTime(1970, 1, 1))).TotalSeconds; int ret = SteamMatchmaking.AddFavoriteGame(TestConstants.Instance.k_AppId_TeamFortress2, TestConstants.k_IpAddress208_78_165_233_uint, TestConstants.k_Port27015, TestConstants.k_Port27015, Constants.k_unFavoriteFlagFavorite, CurrentUnixTime); print("SteamMatchmaking.AddFavoriteGame(" + TestConstants.Instance.k_AppId_TeamFortress2 + ", " + TestConstants.k_IpAddress208_78_165_233_uint + ", " + TestConstants.k_Port27015 + ", " + TestConstants.k_Port27015 + ", " + Constants.k_unFavoriteFlagFavorite + ", " + CurrentUnixTime + ") : " + ret); } if (GUILayout.Button("RemoveFavoriteGame(TestConstants.Instance.k_AppId_TeamFortress2, TestConstants.k_IpAddress208_78_165_233_uint, TestConstants.k_Port27015, TestConstants.k_Port27015, Constants.k_unFavoriteFlagFavorite)")) { bool ret = SteamMatchmaking.RemoveFavoriteGame(TestConstants.Instance.k_AppId_TeamFortress2, TestConstants.k_IpAddress208_78_165_233_uint, TestConstants.k_Port27015, TestConstants.k_Port27015, Constants.k_unFavoriteFlagFavorite); print("SteamMatchmaking.RemoveFavoriteGame(" + TestConstants.Instance.k_AppId_TeamFortress2 + ", " + TestConstants.k_IpAddress208_78_165_233_uint + ", " + TestConstants.k_Port27015 + ", " + TestConstants.k_Port27015 + ", " + Constants.k_unFavoriteFlagFavorite + ") : " + ret); } if (GUILayout.Button("RequestLobbyList()")) { SteamAPICall_t handle = SteamMatchmaking.RequestLobbyList(); OnLobbyMatchListCallResult.Set(handle); print("SteamMatchmaking.RequestLobbyList() : " + handle); } if (GUILayout.Button("AddRequestLobbyListStringFilter(\"SomeStringKey\", \"SomeValue\", ELobbyComparison.k_ELobbyComparisonNotEqual)")) { SteamMatchmaking.AddRequestLobbyListStringFilter("SomeStringKey", "SomeValue", ELobbyComparison.k_ELobbyComparisonNotEqual); print("SteamMatchmaking.AddRequestLobbyListStringFilter(" + "\"SomeStringKey\"" + ", " + "\"SomeValue\"" + ", " + ELobbyComparison.k_ELobbyComparisonNotEqual + ")"); } if (GUILayout.Button("AddRequestLobbyListNumericalFilter(\"SomeIntKey\", 0, ELobbyComparison.k_ELobbyComparisonNotEqual)")) { SteamMatchmaking.AddRequestLobbyListNumericalFilter("SomeIntKey", 0, ELobbyComparison.k_ELobbyComparisonNotEqual); print("SteamMatchmaking.AddRequestLobbyListNumericalFilter(" + "\"SomeIntKey\"" + ", " + 0 + ", " + ELobbyComparison.k_ELobbyComparisonNotEqual + ")"); } if (GUILayout.Button("AddRequestLobbyListNearValueFilter(\"SomeIntKey\", 0)")) { SteamMatchmaking.AddRequestLobbyListNearValueFilter("SomeIntKey", 0); print("SteamMatchmaking.AddRequestLobbyListNearValueFilter(" + "\"SomeIntKey\"" + ", " + 0 + ")"); } if (GUILayout.Button("AddRequestLobbyListFilterSlotsAvailable(3)")) { SteamMatchmaking.AddRequestLobbyListFilterSlotsAvailable(3); print("SteamMatchmaking.AddRequestLobbyListFilterSlotsAvailable(" + 3 + ")"); } if (GUILayout.Button("AddRequestLobbyListDistanceFilter(ELobbyDistanceFilter.k_ELobbyDistanceFilterWorldwide)")) { SteamMatchmaking.AddRequestLobbyListDistanceFilter(ELobbyDistanceFilter.k_ELobbyDistanceFilterWorldwide); print("SteamMatchmaking.AddRequestLobbyListDistanceFilter(" + ELobbyDistanceFilter.k_ELobbyDistanceFilterWorldwide + ")"); } if (GUILayout.Button("AddRequestLobbyListResultCountFilter(1)")) { SteamMatchmaking.AddRequestLobbyListResultCountFilter(1); print("SteamMatchmaking.AddRequestLobbyListResultCountFilter(" + 1 + ")"); } if (GUILayout.Button("AddRequestLobbyListCompatibleMembersFilter((CSteamID)0)")) { SteamMatchmaking.AddRequestLobbyListCompatibleMembersFilter((CSteamID)0); print("SteamMatchmaking.AddRequestLobbyListCompatibleMembersFilter(" + (CSteamID)0 + ")"); } if (GUILayout.Button("GetLobbyByIndex(0)")) { m_Lobby = SteamMatchmaking.GetLobbyByIndex(0); print("SteamMatchmaking.GetLobbyByIndex(" + 0 + ") : " + m_Lobby); } if (GUILayout.Button("CreateLobby(ELobbyType.k_ELobbyTypePublic, 1)")) { SteamAPICall_t handle = SteamMatchmaking.CreateLobby(ELobbyType.k_ELobbyTypePublic, 1); OnLobbyCreatedCallResult.Set(handle); print("SteamMatchmaking.CreateLobby(" + ELobbyType.k_ELobbyTypePublic + ", " + 1 + ") : " + handle); } if (GUILayout.Button("JoinLobby(m_Lobby)")) { SteamAPICall_t handle = SteamMatchmaking.JoinLobby(m_Lobby); OnLobbyEnterCallResult.Set(handle); print("SteamMatchmaking.JoinLobby(" + m_Lobby + ") : " + handle); } if (GUILayout.Button("LeaveLobby(m_Lobby)")) { SteamMatchmaking.LeaveLobby(m_Lobby); m_Lobby = CSteamID.Nil; print("SteamMatchmaking.LeaveLobby(" + m_Lobby + ")"); } if (GUILayout.Button("InviteUserToLobby(m_Lobby, SteamUser.GetSteamID())")) { bool ret = SteamMatchmaking.InviteUserToLobby(m_Lobby, SteamUser.GetSteamID()); print("SteamMatchmaking.InviteUserToLobby(" + m_Lobby + ", " + SteamUser.GetSteamID() + ") : " + ret); } GUILayout.Label("GetNumLobbyMembers(m_Lobby) : " + SteamMatchmaking.GetNumLobbyMembers(m_Lobby)); GUILayout.Label("GetLobbyMemberByIndex(m_Lobby, 0) : " + SteamMatchmaking.GetLobbyMemberByIndex(m_Lobby, 0)); GUILayout.Label("GetLobbyData(m_Lobby, \"name\") : " + SteamMatchmaking.GetLobbyData(m_Lobby, "name")); if (GUILayout.Button("SetLobbyData(m_Lobby, \"name\", \"Test Lobby!\")")) { bool ret = SteamMatchmaking.SetLobbyData(m_Lobby, "name", "Test Lobby!"); print("SteamMatchmaking.SetLobbyData(" + m_Lobby + ", " + "\"name\"" + ", " + "\"Test Lobby!\"" + ") : " + ret); } GUILayout.Label("GetLobbyDataCount(m_Lobby) : " + SteamMatchmaking.GetLobbyDataCount(m_Lobby)); { string Key; string Value; bool ret = SteamMatchmaking.GetLobbyDataByIndex(m_Lobby, 0, out Key, 255, out Value, 255); GUILayout.Label("GetLobbyDataByIndex(m_Lobby, 0, out Key, 255, out Value, 255) : " + ret + " -- " + Key + " -- " + Value); } if (GUILayout.Button("DeleteLobbyData(m_Lobby, \"name\")")) { bool ret = SteamMatchmaking.DeleteLobbyData(m_Lobby, "name"); print("SteamMatchmaking.DeleteLobbyData(" + m_Lobby + ", " + "\"name\"" + ") : " + ret); } GUILayout.Label("GetLobbyMemberData(m_Lobby, SteamUser.GetSteamID(), \"test\") : " + SteamMatchmaking.GetLobbyMemberData(m_Lobby, SteamUser.GetSteamID(), "test")); if (GUILayout.Button("SetLobbyMemberData(m_Lobby, \"test\", \"This is a test Key!\")")) { SteamMatchmaking.SetLobbyMemberData(m_Lobby, "test", "This is a test Key!"); print("SteamMatchmaking.SetLobbyMemberData(" + m_Lobby + ", " + "\"test\"" + ", " + "\"This is a test Key!\"" + ")"); } if (GUILayout.Button("SendLobbyChatMsg(m_Lobby, MsgBody, MsgBody.Length)")) { byte[] MsgBody = System.Text.Encoding.UTF8.GetBytes("Test Message!"); bool ret = SteamMatchmaking.SendLobbyChatMsg(m_Lobby, MsgBody, MsgBody.Length); print("SteamMatchmaking.SendLobbyChatMsg(" + m_Lobby + ", " + MsgBody + ", " + MsgBody.Length + ") : " + ret); } //SteamMatchmaking.GetLobbyChatEntry() // Only called from within OnLobbyChatMsg! if (GUILayout.Button("RequestLobbyData(m_Lobby)")) { bool ret = SteamMatchmaking.RequestLobbyData(m_Lobby); print("SteamMatchmaking.RequestLobbyData(" + m_Lobby + ") : " + ret); } if (GUILayout.Button("SetLobbyGameServer(m_Lobby, TestConstants.k_IpAddress127_0_0_1_uint, TestConstants.k_Port27015, CSteamID.NonSteamGS)")) { SteamMatchmaking.SetLobbyGameServer(m_Lobby, TestConstants.k_IpAddress127_0_0_1_uint, TestConstants.k_Port27015, CSteamID.NonSteamGS); print("SteamMatchmaking.SetLobbyGameServer(" + m_Lobby + ", " + TestConstants.k_IpAddress127_0_0_1_uint + ", " + TestConstants.k_Port27015 + ", " + CSteamID.NonSteamGS + ")"); } { uint GameServerIP; ushort GameServerPort; CSteamID SteamIDGameServer; bool ret = SteamMatchmaking.GetLobbyGameServer(m_Lobby, out GameServerIP, out GameServerPort, out SteamIDGameServer); GUILayout.Label("GetLobbyGameServer(m_Lobby, out GameServerIP, out GameServerPort, out SteamIDGameServer) : " + ret + " -- " + GameServerIP + " -- " + GameServerPort + " -- " + SteamIDGameServer); } if (GUILayout.Button("SetLobbyMemberLimit(m_Lobby, 6)")) { bool ret = SteamMatchmaking.SetLobbyMemberLimit(m_Lobby, 6); print("SteamMatchmaking.SetLobbyMemberLimit(" + m_Lobby + ", " + 6 + ") : " + ret); } GUILayout.Label("GetLobbyMemberLimit(m_Lobby) : " + SteamMatchmaking.GetLobbyMemberLimit(m_Lobby)); if (GUILayout.Button("SetLobbyType(m_Lobby, ELobbyType.k_ELobbyTypePublic)")) { bool ret = SteamMatchmaking.SetLobbyType(m_Lobby, ELobbyType.k_ELobbyTypePublic); print("SteamMatchmaking.SetLobbyType(" + m_Lobby + ", " + ELobbyType.k_ELobbyTypePublic + ") : " + ret); } if (GUILayout.Button("SetLobbyJoinable(m_Lobby, true)")) { bool ret = SteamMatchmaking.SetLobbyJoinable(m_Lobby, true); print("SteamMatchmaking.SetLobbyJoinable(" + m_Lobby + ", " + true + ") : " + ret); } if (GUILayout.Button("GetLobbyOwner(m_Lobby)")) { CSteamID ret = SteamMatchmaking.GetLobbyOwner(m_Lobby); print("SteamMatchmaking.GetLobbyOwner(" + m_Lobby + ") : " + ret); } if (GUILayout.Button("SetLobbyOwner(m_Lobby, SteamUser.GetSteamID())")) { bool ret = SteamMatchmaking.SetLobbyOwner(m_Lobby, SteamUser.GetSteamID()); print("SteamMatchmaking.SetLobbyOwner(" + m_Lobby + ", " + SteamUser.GetSteamID() + ") : " + ret); } if (GUILayout.Button("SetLinkedLobby(m_Lobby, m_Lobby)")) { bool ret = SteamMatchmaking.SetLinkedLobby(m_Lobby, m_Lobby); print("SteamMatchmaking.SetLinkedLobby(" + m_Lobby + ", " + m_Lobby + ") : " + ret); } //SteamMatchmaking.CheckForPSNGameBootInvite() // PS3 Only. GUILayout.EndScrollView(); GUILayout.EndVertical(); }
private void CreateSettingsMenu() { var settingsMenu = SettingsUI.CreateSubMenu(Plugin.instance.Name); var AutoStartLobby = settingsMenu.AddList("Auto-Start Lobby", new float[3] { 0, 1, 2 }); AutoStartLobby.GetValue += delegate { return(_autoStart); }; AutoStartLobby.SetValue += delegate(float value) { _autoStart = value; switch (value) { default: case 0: Config.Instance.AutoStartLobby = false; break; case 1: Config.Instance.AutoStartLobby = true; Config.Instance.IsPublic = false; break; case 2: Config.Instance.AutoStartLobby = true; Config.Instance.IsPublic = true; break; } }; AutoStartLobby.FormatValue += delegate(float value) { switch (value) { default: case 0: return("Disabled"); case 1: return("Private Lobby"); case 2: return("Public Lobby"); } }; var MaxLobbySite = settingsMenu.AddInt("Lobby Size", "Configure the amount of users you want to be able to join your lobby.", 2, 15, 1); MaxLobbySite.GetValue += delegate { return(Config.Instance.MaxLobbySize); }; MaxLobbySite.SetValue += delegate(int value) { SteamMatchmaking.SetLobbyMemberLimit(SteamAPI.getLobbyID(), value); Config.Instance.MaxLobbySize = value; }; var Volume = settingsMenu.AddInt("Voice Volume", "Higher numbers are louder", 1, 20, 1); Volume.GetValue += delegate { return((int)Config.Instance.Volume); }; Volume.SetValue += delegate(int value) { Config.Instance.Volume = (float)value; AudioMixerGroup g = Utils.Assets.AudioGroup; g.audioMixer.SetFloat("MasterVolume", (float)value); }; var Avatar = settingsMenu.AddList("Enable Avatars", new float[4] { 0, 1, 2, 3 }); Avatar.GetValue += delegate { return(_avatarState); }; Avatar.SetValue += delegate(float value) { _avatarState = value; switch (value) { default: case 0: Config.Instance.AvatarsInLobby = false; Config.Instance.AvatarsInGame = false; break; case 1: Config.Instance.AvatarsInLobby = true; Config.Instance.AvatarsInGame = false; break; case 2: Config.Instance.AvatarsInLobby = false; Config.Instance.AvatarsInGame = true; break; case 3: Config.Instance.AvatarsInLobby = true; Config.Instance.AvatarsInGame = true; break; } }; Avatar.FormatValue += delegate(float value) { switch (value) { default: case 0: return("Disabled"); case 1: return("Lobby Only"); case 2: return("InGame Only"); case 3: return("Enabled"); } }; var NetworkQuality = settingsMenu.AddInt("Network Quality", "Higher number, smoother avatar. Note that this effects how you appear to others. ", 0, 5, 1); NetworkQuality.GetValue += delegate { return(Config.Instance.NetworkQuality); }; NetworkQuality.SetValue += delegate(int value) { Config.Instance.NetworkQuality = value; if (Controllers.PlayerController.Instance.isBroadcasting) { Controllers.PlayerController.Instance.StopBroadcasting(); Controllers.PlayerController.Instance.StartBroadcasting(); } }; }
// Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250 private static void Main(string[] args) { Environment.SetEnvironmentVariable("SteamAppId", "212480"); Callback <LobbyMatchList_t> .Create(new Callback <LobbyMatchList_t> .DispatchDelegate(Program.OnGetLobbiesList)); Callback <LobbyEnter_t> .Create(new Callback <LobbyEnter_t> .DispatchDelegate(Program.OnLobbyEnter)); if (SteamAPI.Init()) { if (args.Length != 0) { string a = args[0]; if (!(a == "lobbylist")) { if (!(a == "playerlist")) { if (!(a == "friendlist")) { if (!(a == "migratehost")) { if (!(a == "setplayerlimit")) { Program.finished = true; } else { SteamMatchmaking.SetLobbyMemberLimit((CSteamID)Convert.ToUInt64(args[1]), Convert.ToInt32(args[2])); Program.finished = true; } } else { SteamMatchmaking.SetLobbyOwner((CSteamID)Convert.ToUInt64(args[1]), (CSteamID)Convert.ToUInt64(args[2])); Program.finished = true; } } else { Program.GetFriendList(); } } else { SteamMatchmaking.JoinLobby((CSteamID)Convert.ToUInt64(args[1])); } } else { SteamMatchmaking.AddRequestLobbyListDistanceFilter(ELobbyDistanceFilter.k_ELobbyDistanceFilterWorldwide); SteamMatchmaking.RequestLobbyList(); } } else { Program.finished = true; } Program._Timer.Elapsed += Program.TimeOut; Program._Timer.Start(); while (!Program.finished && !Program.timedOut) { SteamAPI.RunCallbacks(); } if (Program.timedOut) { Console.WriteLine("-2"); } SteamAPI.Shutdown(); return; } Console.WriteLine("-1"); }
public void RenderOnGUI() { //GUILayout.BeginArea(new Rect(Screen.width - 120, 0, 120, Screen.height)); Console.WriteLine("Variables:"); Console.WriteLine("m_Lobby: " + m_Lobby); //GUILayout.EndArea(); Console.WriteLine("GetFavoriteGameCount() : " + SteamMatchmaking.GetFavoriteGameCount()); { AppId_t AppID; uint IP; ushort ConnPort; ushort QueryPort; uint Flags; uint LastPlayedOnServer; bool ret = SteamMatchmaking.GetFavoriteGame(0, out AppID, out IP, out ConnPort, out QueryPort, out Flags, out LastPlayedOnServer); Console.WriteLine("GetFavoriteGame(0, out AppID, out IP, out ConnPort, out QueryPort, out Flags, out LastPlayedOnServer) : " + ret + " -- " + AppID + " -- " + IP + " -- " + ConnPort + " -- " + QueryPort + " -- " + Flags + " -- " + LastPlayedOnServer); } // 3494815209 = 208.78.165.233 = Valve Payload Server (Virginia srcds150 #1) //if (GUILayout.Button("AddFavoriteGame((AppId_t)480, 3494815209, 27015, 27015, Constants.k_unFavoriteFlagFavorite, CurrentUnixTime")) { uint CurrentUnixTime = (uint)(System.DateTime.UtcNow.Subtract(new System.DateTime(1970, 1, 1))).TotalSeconds; Console.WriteLine("SteamMatchmaking.AddFavoriteGame(" + (AppId_t)480 + ", 3494815209, 27015, 27015, Constants.k_unFavoriteFlagFavorite, " + CurrentUnixTime + ") : " + SteamMatchmaking.AddFavoriteGame((AppId_t)480, 3494815209, 27015, 27015, Constants.k_unFavoriteFlagFavorite, CurrentUnixTime)); } //if (GUILayout.Button("RemoveFavoriteGame((AppId_t)480, 3494815209, 27015, 27015, Constants.k_unFavoriteFlagFavorite)")) { Console.WriteLine("SteamMatchmaking.RemoveFavoriteGame(" + (AppId_t)480 + ", 3494815209, 27015, 27015, Constants.k_unFavoriteFlagFavorite) : " + SteamMatchmaking.RemoveFavoriteGame((AppId_t)480, 3494815209, 27015, 27015, Constants.k_unFavoriteFlagFavorite)); } //if (GUILayout.Button("RequestLobbyList()")) { SteamAPICall_t handle = SteamMatchmaking.RequestLobbyList(); OnLobbyMatchListCallResult.Set(handle); Console.WriteLine("SteamMatchmaking.RequestLobbyList() : " + handle); } //if (GUILayout.Button("AddRequestLobbyListStringFilter(\"SomeStringKey\", \"SomeValue\", ELobbyComparison.k_ELobbyComparisonNotEqual)")) { SteamMatchmaking.AddRequestLobbyListStringFilter("SomeStringKey", "SomeValue", ELobbyComparison.k_ELobbyComparisonNotEqual); Console.WriteLine("SteamMatchmaking.AddRequestLobbyListStringFilter(\"SomeStringKey\", \"SomeValue\", ELobbyComparison.k_ELobbyComparisonNotEqual)"); } //if (GUILayout.Button("AddRequestLobbyListNumericalFilter(\"SomeIntKey\", 0, ELobbyComparison.k_ELobbyComparisonNotEqual)")) { SteamMatchmaking.AddRequestLobbyListNumericalFilter("SomeIntKey", 0, ELobbyComparison.k_ELobbyComparisonNotEqual); Console.WriteLine("SteamMatchmaking.AddRequestLobbyListNumericalFilter(\"SomeIntKey\", 0, ELobbyComparison.k_ELobbyComparisonNotEqual)"); } //if (GUILayout.Button("AddRequestLobbyListNearValueFilter(\"SomeIntKey\", 0)")) { SteamMatchmaking.AddRequestLobbyListNearValueFilter("SomeIntKey", 0); Console.WriteLine("SteamMatchmaking.AddRequestLobbyListNearValueFilter(\"SomeIntKey\", 0)"); } //if (GUILayout.Button("AddRequestLobbyListFilterSlotsAvailable(3)")) { SteamMatchmaking.AddRequestLobbyListFilterSlotsAvailable(3); Console.WriteLine("SteamMatchmaking.AddRequestLobbyListFilterSlotsAvailable(3)"); } //if (GUILayout.Button("AddRequestLobbyListDistanceFilter(ELobbyDistanceFilter.k_ELobbyDistanceFilterWorldwide)")) { SteamMatchmaking.AddRequestLobbyListDistanceFilter(ELobbyDistanceFilter.k_ELobbyDistanceFilterWorldwide); Console.WriteLine("SteamMatchmaking.AddRequestLobbyListDistanceFilter(ELobbyDistanceFilter.k_ELobbyDistanceFilterWorldwide)"); } //if (GUILayout.Button("AddRequestLobbyListResultCountFilter(1)")) { SteamMatchmaking.AddRequestLobbyListResultCountFilter(1); Console.WriteLine("SteamMatchmaking.AddRequestLobbyListResultCountFilter(1)"); } //if (GUILayout.Button("AddRequestLobbyListCompatibleMembersFilter((CSteamID)0)")) { SteamMatchmaking.AddRequestLobbyListCompatibleMembersFilter((CSteamID)0); Console.WriteLine("SteamMatchmaking.AddRequestLobbyListCompatibleMembersFilter((CSteamID)0)"); } //if (GUILayout.Button("GetLobbyByIndex(0)")) { m_Lobby = SteamMatchmaking.GetLobbyByIndex(0); Console.WriteLine("SteamMatchmaking.SteamMatchmaking.GetLobbyByIndex(0) : " + m_Lobby); } //if (GUILayout.Button("CreateLobby(ELobbyType.k_ELobbyTypePublic, 1)")) { SteamAPICall_t handle = SteamMatchmaking.CreateLobby(ELobbyType.k_ELobbyTypePublic, 1); OnLobbyCreatedCallResult.Set(handle); Console.WriteLine("SteamMatchmaking.CreateLobby(ELobbyType.k_ELobbyTypePublic, 1) : " + handle); } //if (GUILayout.Button("JoinLobby(m_Lobby)")) { SteamAPICall_t handle = SteamMatchmaking.JoinLobby(m_Lobby); OnLobbyEnterCallResult.Set(handle); Console.WriteLine("SteamMatchmaking.JoinLobby(" + m_Lobby + ") : " + handle); } //if (GUILayout.Button("LeaveLobby(m_Lobby)")) { SteamMatchmaking.LeaveLobby(m_Lobby); m_Lobby = CSteamID.Nil; Console.WriteLine("SteamMatchmaking.LeaveLobby(" + m_Lobby + ")"); } //if (GUILayout.Button("InviteUserToLobby(m_Lobby, SteamUser.GetSteamID())")) { Console.WriteLine("SteamMatchmaking.InviteUserToLobby(" + m_Lobby + ", SteamUser.GetSteamID()) : " + SteamMatchmaking.InviteUserToLobby(m_Lobby, SteamUser.GetSteamID())); } Console.WriteLine("GetNumLobbyMembers(m_Lobby) : " + SteamMatchmaking.GetNumLobbyMembers(m_Lobby)); Console.WriteLine("GetLobbyMemberByIndex(m_Lobby, 0) : " + SteamMatchmaking.GetLobbyMemberByIndex(m_Lobby, 0)); Console.WriteLine("SteamMatchmaking.GetLobbyData(m_Lobby, \"name\") : " + SteamMatchmaking.GetLobbyData(m_Lobby, "name")); //if (GUILayout.Button("SetLobbyData(m_Lobby, \"name\", \"Test Lobby!\")")) { Console.WriteLine("SteamMatchmaking.SetLobbyData(" + m_Lobby + ", \"name\", \"Test Lobby!\") : " + SteamMatchmaking.SetLobbyData(m_Lobby, "name", "Test Lobby!")); } Console.WriteLine("GetLobbyDataCount(m_Lobby) : " + SteamMatchmaking.GetLobbyDataCount(m_Lobby)); { string Key; string Value; bool ret = SteamMatchmaking.GetLobbyDataByIndex(m_Lobby, 0, out Key, 255, out Value, 255); Console.WriteLine("SteamMatchmaking.GetLobbyDataByIndex(m_Lobby, 0, out Key, 255, out Value, 255) : " + ret + " -- " + Key + " -- " + Value); } //if (GUILayout.Button("DeleteLobbyData(m_Lobby, \"name\")")) { Console.WriteLine("SteamMatchmaking.DeleteLobbyData(" + m_Lobby + ", \"name\") : " + SteamMatchmaking.DeleteLobbyData(m_Lobby, "name")); } { Console.WriteLine("SteamMatchmaking.GetLobbyMemberData(m_Lobby, SteamUser.GetSteamID(), \"test\") : " + SteamMatchmaking.GetLobbyMemberData(m_Lobby, SteamUser.GetSteamID(), "test")); } //if (GUILayout.Button("SetLobbyMemberData(m_Lobby, \"test\", \"This is a test Key!\")")) { SteamMatchmaking.SetLobbyMemberData(m_Lobby, "test", "This is a test Key!"); Console.WriteLine("SteamMatchmaking.SetLobbyMemberData(" + m_Lobby + ", \"test\", \"This is a test Key!\")"); } //if (GUILayout.Button("SendLobbyChatMsg(m_Lobby, MsgBody, MsgBody.Length)")) { byte[] MsgBody = System.Text.Encoding.UTF8.GetBytes("Test Message!"); Console.WriteLine("SteamMatchmaking.SendLobbyChatMsg(" + m_Lobby + ", MsgBody, MsgBody.Length) : " + SteamMatchmaking.SendLobbyChatMsg(m_Lobby, MsgBody, MsgBody.Length)); } //GetLobbyChatEntry(CSteamID steamIDLobby, int iChatID, out CSteamID pSteamIDUser, byte[] pvData, int cubData, out EChatEntryType peChatEntryType); // Only called from within OnLobbyChatMsg! //if (GUILayout.Button("RequestLobbyData(m_Lobby)")) { Console.WriteLine("SteamMatchmaking.RequestLobbyData(" + m_Lobby + ") : " + SteamMatchmaking.RequestLobbyData(m_Lobby)); } //if (GUILayout.Button("SetLobbyGameServer(m_Lobby, 2130706433, 1337, CSteamID.NonSteamGS)")) { SteamMatchmaking.SetLobbyGameServer(m_Lobby, 2130706433, 1337, CSteamID.NonSteamGS); //127.0.0.1 Console.WriteLine("SteamMatchmaking.SetLobbyGameServer(" + m_Lobby + ", 2130706433, 1337, CSteamID.NonSteamGS)"); } { uint GameServerIP; ushort GameServerPort; CSteamID SteamIDGameServer; bool ret = SteamMatchmaking.GetLobbyGameServer(m_Lobby, out GameServerIP, out GameServerPort, out SteamIDGameServer); Console.WriteLine("GetLobbyGameServer(m_Lobby, out GameServerIP, out GameServerPort, out SteamIDGameServer) : " + ret + " -- " + GameServerIP + " -- " + GameServerPort + " -- " + SteamIDGameServer); } //if (GUILayout.Button("SetLobbyMemberLimit(m_Lobby, 6)")) { Console.WriteLine("SteamMatchmaking.SteamMatchmaking.SetLobbyMemberLimit(" + m_Lobby + ", 6) : " + SteamMatchmaking.SetLobbyMemberLimit(m_Lobby, 6)); } Console.WriteLine("GetLobbyMemberLimit(m_Lobby) : " + SteamMatchmaking.GetLobbyMemberLimit(m_Lobby)); //if (GUILayout.Button("SetLobbyType(m_Lobby, ELobbyType.k_ELobbyTypePublic))")) { Console.WriteLine("SteamMatchmaking.SetLobbyType(" + m_Lobby + ", ELobbyType.k_ELobbyTypePublic)) : " + SteamMatchmaking.SetLobbyType(m_Lobby, ELobbyType.k_ELobbyTypePublic)); } //if (GUILayout.Button("SetLobbyJoinable(m_Lobby, true)")) { Console.WriteLine("SteamMatchmaking.SetLobbyJoinable(" + m_Lobby + ", true) : " + SteamMatchmaking.SetLobbyJoinable(m_Lobby, true)); } //if (GUILayout.Button("GetLobbyOwner(m_Lobby)")) { Console.WriteLine("SteamMatchmaking.GetLobbyOwner(" + m_Lobby + ") : " + SteamMatchmaking.GetLobbyOwner(m_Lobby)); } //if (GUILayout.Button("SetLobbyOwner(m_Lobby, SteamUser.GetSteamID())")) { Console.WriteLine("SteamMatchmaking.SteamMatchmaking.SetLobbyOwner(" + m_Lobby + ", SteamUser.GetSteamID()) : " + SteamMatchmaking.SetLobbyOwner(m_Lobby, SteamUser.GetSteamID())); } //if (GUILayout.Button("SetLinkedLobby(m_Lobby, m_Lobby)")) { Console.WriteLine("SteamMatchmaking.SteamMatchmaking.SetLinkedLobby(" + m_Lobby + ", " + m_Lobby + ") : " + SteamMatchmaking.SetLinkedLobby(m_Lobby, m_Lobby)); } }
public void SetMemberLimit(int limit) { this.Info.MemberLimit = limit; SteamMatchmaking.SetLobbyMemberLimit(this.Info.LobbyId, limit); }
public void SetLobbyMemberLimit(int nb) { SteamMatchmaking.SetLobbyMemberLimit(steamLobbyId, nb); }