From ac01bde6b9673b80dd225be3edebbe2255d9ebd2 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 10 Sep 2023 21:17:03 +0200 Subject: implement plugin as class, create server class --- src/ns_plugin.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/ns_plugin.h (limited to 'src/ns_plugin.h') diff --git a/src/ns_plugin.h b/src/ns_plugin.h new file mode 100644 index 0000000..f1567a4 --- /dev/null +++ b/src/ns_plugin.h @@ -0,0 +1,25 @@ +#ifndef NS_PLUGIN_H +#define NS_PLUGIN_H + +// Needed to bootstrap plugin abi +#include +#include +#include +#include +#include +#include + +#include "plugin_abi.h" +// ConCommand/ConVar types +#include "core/macros.h" +#include "core/convar/convar.h" +#include "core/convar/concommand.h" + +// This is a mess +// hope Plugins V3 includes these in the ABI +// pls cat :womp: +typedef void (*ConCommandConstructorType)(ConCommand* newCommand, const char* name, FnCommandCallback_t callback, const char* helpString, int flags, void* parent); +typedef void (*ConVarMallocType)(void* pConVarMaloc, int a2, int a3); +typedef void (*ConVarRegisterType)(ConVar* pConVar, const char* pszName, const char* pszDefaultValue, int nFlags, const char* pszHelpString, bool bMin, float fMin, bool bMax, float fMax, void* pCallback); + +#endif -- cgit v1.2.3