#if defined _connecthook_included #endinput #endif #define _connecthook_included enum EConnect { k_OnClientPreConnectEx_Reject = 0, k_OnClientPreConnectEx_Async = 1, k_OnClientPreConnectEx_Accept = 2, }; typedef PreConnectHook = function EConnect (int id, const char[] sName, const char[] sPassword, const char[] sIP, const char[] sSteam32ID, char sRejectReason[512]); // The lower priority value takes more precedence. native void ClientPreConnect_Hook(int prio, PreConnectHook func); native void ClientPreConnect_Unhook(int prio, PreConnectHook func); native bool ClientPreConnect_Reject(int id, const char[] reason); native bool ClientPreConnect_Accept(int id); native int ClientPreConnect_GetConnectClientCount(); public Extension __ext_connecthook = { name = "connecthook", file = "connecthook.ext", #if defined AUTOLOAD_EXTENSIONS autoload = 1, #else autoload = 0, #endif #if defined REQUIRE_EXTENSIONS required = 1, #else required = 0, #endif }; #if !defined REQUIRE_EXTENSIONS public void __ext_connecthook_SetNTVOptional() { MarkNativeAsOptional("ClientPreConnect_Hook"); MarkNativeAsOptional("ClientPreConnect_Unhook"); MarkNativeAsOptional("ClientPreConnect_Reject"); MarkNativeAsOptional("ClientPreConnect_Accept"); MarkNativeAsOptional("ClientPreConnect_GetConnectClientCount"); } #endif