AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [REQ][PAID?][L4D2]Friends/Private lobby , Forced to public matchmaking? (https://forums.alliedmods.net/showthread.php?t=325369)

timonenluca 06-19-2020 00:20

[REQ][PAID?][L4D2]Friends/Private lobby , Forced to public matchmaking?
 
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

CowGod 06-19-2020 11:35

Re: [REQ][PAID?][L4D2]Friends/Private lobby , Forced to public matchmaking?
 
********* on discord I may be able to help u out

Silvers 06-19-2020 14:34

Re: [REQ][PAID?][L4D2]Friends/Private lobby , Forced to public matchmaking?
 
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.

Alex101192 06-19-2020 20:06

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

Originally Posted by Silvers (Post 2706444)
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?

Silvers 06-19-2020 20:24

Re: [REQ][PAID?][L4D2]Friends/Private lobby , Forced to public matchmaking?
 
*Points to title*

why is reading so difficult

timonenluca 06-19-2020 22:18

Re: [REQ][PAID?][L4D2]Friends/Private lobby , Forced to public matchmaking?
 
@Silvers Thanks! Seems to work quite well.

@cowgod Probarly for next time , thanks for the offer!

Alex101192 06-20-2020 01:37

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

Originally Posted by Silvers (Post 2706475)
*Points to title*

why is reading so difficult

:x

WhatsAnName 02-13-2022 11:38

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

Originally Posted by Silvers (Post 2706444)
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


All times are GMT -4. The time now is 04:51.

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