Raised This Month: $ Target: $400
 0% 

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


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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 #5

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
 


Thread Tools
Display Modes

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 04:50.


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