Raised This Month: $51 Target: $400
 12% 

[REQ][PAID?][L4D2]Friends/Private lobby , Forced to public matchmaking?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
timonenluca
Member
Join Date: Apr 2020
Location: Europe
Old 06-19-2020 , 00:20   [REQ][PAID?][L4D2]Friends/Private lobby , Forced to public matchmaking?
Reply With Quote #1

Hi , Currently i have no idea if it's even possible. The problem i have at the very moment are people using my community servers for private reasons.

Multiple times some members off my community try to join these friends/private games since they are being hold on my servers only ending up with people who think they have any right to keep the server for themself. Votekicking , herrasment are all to common and im getting quite tired off it. Im looking to be able to deny such selfish behaviour and forcing the server onto the public matchmaking lobby list once used by a private party or friends only game.

I would love to have my server being used by everyone without claiming the entire server for themself!

best regards ,

timonenluca
timonenluca is offline
CowGod
Senior Member
Join Date: Feb 2015
Old 06-19-2020 , 11:35   Re: [REQ][PAID?][L4D2]Friends/Private lobby , Forced to public matchmaking?
Reply With Quote #2

********* on discord I may be able to help u out
CowGod is offline
Send a message via Skype™ to CowGod
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 06-19-2020 , 14:34   Re: [REQ][PAID?][L4D2]Friends/Private lobby , Forced to public matchmaking?
Reply With Quote #3

PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <left4dhooks>

ConVar sv_allow_lobby_connect_only;

public 
void OnPluginStart()
{
    
HookEvent("player_connect"Event_PlayerConnect);

    
sv_allow_lobby_connect_only FindConVar("sv_allow_lobby_connect_only");
    
sv_allow_lobby_connect_only.AddChangeHook(ConVarChanged_Cvars);
}

public 
void ConVarChanged_Cvars(Handle convar, const char[] oldValue, const char[] newValue)
{
    
sv_allow_lobby_connect_only.IntValue 0;
}

public 
void Event_PlayerConnect(Event event, const char[] namebool dontBroadcast)
{
    
int total;
    for( 
int i 1<= MaxClientsi++ )
    {
        if( 
IsClientConnected(i) && !IsFakeClient(i) )
        {
            if( 
total++ > ) return;
        }
    }

    if( 
total == )
    {
        
L4D_LobbyUnreserve();
        
PrintToServer("Lobby auto unreserved.");
    }

Seems to work.
__________________
Silvers is offline
Alex101192
Senior Member
Join Date: Aug 2018
Old 06-19-2020 , 20:06   Re: [REQ][PAID?][L4D2]Friends/Private lobby , Forced to public matchmaking?
Reply With Quote #4

Quote:
Originally Posted by Silvers View Post
PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <left4dhooks>

ConVar sv_allow_lobby_connect_only;

public 
void OnPluginStart()
{
    
HookEvent("player_connect"Event_PlayerConnect);

    
sv_allow_lobby_connect_only FindConVar("sv_allow_lobby_connect_only");
    
sv_allow_lobby_connect_only.AddChangeHook(ConVarChanged_Cvars);
}

public 
void ConVarChanged_Cvars(Handle convar, const char[] oldValue, const char[] newValue)
{
    
sv_allow_lobby_connect_only.IntValue 0;
}

public 
void Event_PlayerConnect(Event event, const char[] namebool dontBroadcast)
{
    
int total;
    for( 
int i 1<= MaxClientsi++ )
    {
        if( 
IsClientConnected(i) && !IsFakeClient(i) )
        {
            if( 
total++ > ) return;
        }
    }

    if( 
total == )
    {
        
L4D_LobbyUnreserve();
        
PrintToServer("Lobby auto unreserved.");
    }

Seems to work.
What does this do?
Alex101192 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 06-19-2020 , 20:24   Re: [REQ][PAID?][L4D2]Friends/Private lobby , Forced to public matchmaking?
Reply With Quote #5

*Points to title*

why is reading so difficult
__________________
Silvers is offline
timonenluca
Member
Join Date: Apr 2020
Location: Europe
Old 06-19-2020 , 22:18   Re: [REQ][PAID?][L4D2]Friends/Private lobby , Forced to public matchmaking?
Reply With Quote #6

@Silvers Thanks! Seems to work quite well.

@cowgod Probarly for next time , thanks for the offer!
timonenluca is offline
Alex101192
Senior Member
Join Date: Aug 2018
Old 06-20-2020 , 01:37   Re: [REQ][PAID?][L4D2]Friends/Private lobby , Forced to public matchmaking?
Reply With Quote #7

Quote:
Originally Posted by Silvers View Post
*Points to title*

why is reading so difficult
Alex101192 is offline
WhatsAnName
Member
Join Date: Jun 2018
Old 02-13-2022 , 11:38   Re: [REQ][PAID?][L4D2]Friends/Private lobby , Forced to public matchmaking?
Reply With Quote #8

Quote:
Originally Posted by Silvers View Post
PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <left4dhooks>

ConVar sv_allow_lobby_connect_only;

public 
void OnPluginStart()
{
    
HookEvent("player_connect"Event_PlayerConnect);

    
sv_allow_lobby_connect_only FindConVar("sv_allow_lobby_connect_only");
    
sv_allow_lobby_connect_only.AddChangeHook(ConVarChanged_Cvars);
}

public 
void ConVarChanged_Cvars(Handle convar, const char[] oldValue, const char[] newValue)
{
    
sv_allow_lobby_connect_only.IntValue 0;
}

public 
void Event_PlayerConnect(Event event, const char[] namebool dontBroadcast)
{
    
int total;
    for( 
int i 1<= MaxClientsi++ )
    {
        if( 
IsClientConnected(i) && !IsFakeClient(i) )
        {
            if( 
total++ > ) return;
        }
    }

    if( 
total == )
    {
        
L4D_LobbyUnreserve();
        
PrintToServer("Lobby auto unreserved.");
    }

Seems to work.
does this still work? i tried it and even though someone was playing tanks playground on expert friends only i didn't see it get listed in the campaiqn coop public list
WhatsAnName is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode