Skocz do zawartości

[RSS] [L4D & L4D2] Enforce Gametypes [v1.0 (25-Apr-2023)]


GameNation

Rekomendowane odpowiedzi

.
Enforce Gametypes (l4d_enforce_gametypes) by Mystik Spiral

Objective:
  • Prevent client using mm_dedicated_force_servers to override sv_gametypes on server.
  • If mp_gamemode from incoming connection is not included in sv_gametypes, reject client connection.
  • If sv_gametypes is not set in your server.cfg file, it should default to:
    coop,realism,survival,versus,scavenge,dash,ho ldout,shootzones

Description and options:

My server has sv_gametypes set to "coop,realism,nightmaredifficulty", but I was seeing other active game modes. I discovered that clients were setting mm_dedicated_force_servers to my server IP address and port, then connecting from lobby. Apparently, mm_dedicated_force_servers overrides the value for sv_gametypes. This simple plugin checks the value of mp_gamemode (set during lobby reservation) and compares it to the values in sv_gametypes... if there is no match the client connections are rejected.

This plugin does not have any configurable console variables.

Notes:

This plugin does everything I expect it to do and I do not plan to add any new features. However, if you use this and find any bugs, please let me know and I will do my best to correct them. I have only tested this with L4D2, but I expect it should also work with L4D1. It will probably work with any game that uses sv_gametypes and mp_gamemode.

Version history:
Code:

25-Apr-2023 v1.0
- Initial release

Installation:
Place the l4d_enforce_gametypes.smx file in the SourceMod "plugins" directory.

Attached Files
File Type: sp Get Plugin or Get Source (l4d_enforce_gametypes.sp - 3.7 KB)

Przeczytaj cały wpis na stronie AlliedModders

Odnośnik do komentarza
Udostępnij na innych stronach

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.

Gość
Dodaj odpowiedź do tematu...

×   Wklejono zawartość z formatowaniem.   Usuń formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę.