From 71c90a9270d2d335764aa8e72b1fcbc1a4f21756 Mon Sep 17 00:00:00 2001 From: Oldcustard <147gusto@gmail.com> Date: Thu, 2 Mar 2023 00:30:30 +1100 Subject: [PATCH] restructure --- config_loader.sp | 61 ------------------------------------------------ 1 file changed, 61 deletions(-) delete mode 100644 config_loader.sp diff --git a/config_loader.sp b/config_loader.sp deleted file mode 100644 index 5ddca6d..0000000 --- a/config_loader.sp +++ /dev/null @@ -1,61 +0,0 @@ -#include -#include -#include -// ^ tf2_stocks.inc itself includes sdktools.inc and tf2.inc - -#pragma semicolon 1 -#pragma newdecls required - -#define PLUGIN_VERSION "0.1" - -public Plugin myinfo = -{ - name = "Config Reminder", - author = "Rhizome", - description = "Hassles users until they exec", - version = PLUGIN_VERSION, - url = "https://rhizome.tf" -}; - -public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) -{ - // No need for the old GetGameFolderName setup. - EngineVersion g_engineversion = GetEngineVersion(); - if (g_engineversion != Engine_TF2) - { - SetFailState("This plugin was made for use with Team Fortress 2 only."); - } -} - -public void OnPluginStart() -{ - /** - * @note For the love of god, please stop using FCVAR_PLUGIN. - * Console.inc even explains this above the entry for the FCVAR_PLUGIN define. - * "No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk." - */ - CreateConVar("sm_pluginnamehere_version", PLUGIN_VERSION, "Standard plugin version ConVar. Please don't change me!", FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD); -} - -public void OnMapStart() -{ - /** - * @note Precache your models, sounds, etc. here! - * Not in OnConfigsExecuted! Doing so leads to issues. - */ - CreateTimer(15.0, PostReminder, 0, TIMER_REPEAT); - HookEvent("teamplay_restart_round", BlockStart, EventHookMode_Pre); -} - -Action PostReminder(Handle timer, any data) -{ - CPrintToChatAll("{red}No config is applied! Ensure config is applied before starting."); - return Plugin_Handled; -} - -Action BlockStart(Event event, const char[] name, bool dontBroadcast) -{ - ServerCommand("mp_tournament_restart"); - CPrintToChatAll("{red}Bad rollout! {default}(Did you forget to exec?)"); - return Plugin_Handled; -} \ No newline at end of file