Raised This Month: $ Target: $400
 0% 

Solved [L4D2] Trying to detect lobby connection


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Morning
Member
Join Date: May 2021
Old 02-05-2022 , 07:44   [L4D2] Trying to detect lobby connection
Reply With Quote #1

I'm trying to find a way to detect if someone has connected with (or without) a lobby. Closest thing I found is in Left4dhooks and marked deprecated.

Code:
// DEPRECATED - UNUSED
// The campaign scores are updated after L4D_OnSetCampaignScores
// native int L4D_GetCampaignScores(int &scoreA, int &scoreB);
// native bool L4D_LobbyIsReserved();
Basically I just want to kick players if they connect without a lobby - That way I can tell them to come back with a lobby. sv_allow_lobby_connect_only drops players with no disconnect message (or "session is no longer available"). Also, it's giving me some strange problems and when I try to start the server with a lobby I get " Server error - failed to handle reservation request."

Last edited by Morning; 02-16-2022 at 08:31.
Morning is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 02-05-2022 , 11:18   Re: [L4D2] Trying to detect lobby connection
Reply With Quote #2

Actually I can add L4D_LobbyIsReserved back into left4dhooks. Next update should contain it.

Edit: Done and update release:

PHP Code:
// Checks if the server is currently reserved for a lobby
native bool L4D_LobbyIsReserved();

// Returns the lobby reservation ID
native void L4D_GetLobbyReservation(char [] reservationint maxlength);

// Sets the lobby reservation ID
native void L4D_SetLobbyReservation(char reservation[20]); 
__________________

Last edited by Silvers; 02-06-2022 at 08:45.
Silvers is offline
Morning
Member
Join Date: May 2021
Old 02-05-2022 , 13:33   Re: [L4D2] Trying to detect lobby connection
Reply With Quote #3

That would be great, just to play around with making server management easier. The lobby / matchmaking system is quite restrictive, and it pretty much all seems hardcoded; the L4d2 8 player lobby limit for example, or that a server can only support one lobby, or that the server can't force direct-connected players into the lobby that is attached to the server.

Our main problem is that steam group members tend to join directly rather than through matchmaking, and after a while, the server experiences "lobby death" because the lobby counts the people in the server and assumes they must all be part of the lobby and so it disappears from matchmaking.

When members join directly, a lobby can't connect, meaning I have to go in and kick everybody to attach a lobby.

So any kind of lobby control / functions / hooks would be good at this point, but I know there are limits, so thanks for whatever you can do Silvers.

Edit: Thanks so much for the updates Silvers, i'll play around with your new natives and see if i can come up with some helpful solutions!

Last edited by Morning; 02-16-2022 at 08:31.
Morning 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 09:26.


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