From 5787fca029a6da4ded95b1cce95ef7ca04071169 Mon Sep 17 00:00:00 2001 From: Nick Hastings Date: Mon, 15 Nov 2021 20:53:09 -0500 Subject: [PATCH] Disable Reserved Slots plugin on Contagion. (It doesn't have sv_visiblemaxplayers). --- plugins/reservedslots.sp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins/reservedslots.sp b/plugins/reservedslots.sp index 317bd354..2ba4b3e1 100644 --- a/plugins/reservedslots.sp +++ b/plugins/reservedslots.sp @@ -64,6 +64,18 @@ enum KickType Kick_Random, }; +public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) +{ + if (GetEngineVersion() == Engine_Contagion) + { + // sv_visiblemaxplayers doesn't exist + strcopy(error, err_max, "Reserved Slots is incompatible with this game"); + return APLRes_SilentFailure; + } + + return APLRes_Success; +} + public void OnPluginStart() { LoadTranslations("reservedslots.phrases");