OCD Fix.
This commit is contained in:
parent
998b570477
commit
589960b49f
@ -1,7 +1,7 @@
|
|||||||
#include <sourcemod>
|
#include <sourcemod>
|
||||||
#include <sdktools>
|
#include <sdktools>
|
||||||
#include <cstrike>
|
#include <cstrike>
|
||||||
#include <AfkManager>
|
#include <AFKManager>
|
||||||
|
|
||||||
#undef REQUIRE_PLUGIN
|
#undef REQUIRE_PLUGIN
|
||||||
#include <zombiereloaded>
|
#include <zombiereloaded>
|
||||||
@ -101,13 +101,13 @@ public void OnPluginStart()
|
|||||||
|
|
||||||
HookEntityOutput("trigger_teleport", "OnEndTouch", Teleport_OnEndTouch);
|
HookEntityOutput("trigger_teleport", "OnEndTouch", Teleport_OnEndTouch);
|
||||||
|
|
||||||
AutoExecConfig(true, "plugin.AfkManager");
|
AutoExecConfig(true, "plugin.AFKManager");
|
||||||
}
|
}
|
||||||
|
|
||||||
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)
|
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)
|
||||||
{
|
{
|
||||||
CreateNative("GetClientIdleTime", Native_GetClientIdleTime);
|
CreateNative("GetClientIdleTime", Native_GetClientIdleTime);
|
||||||
RegPluginLibrary("AfkManager");
|
RegPluginLibrary("AFKManager");
|
||||||
|
|
||||||
return APLRes_Success;
|
return APLRes_Success;
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
#if defined _AfkManager_Included
|
#if defined _AFKManager_Included
|
||||||
#endinput
|
#endinput
|
||||||
#endif
|
#endif
|
||||||
#define _AfkManager_Included
|
#define _AFKManager_Included
|
||||||
|
|
||||||
native int GetClientIdleTime(int client);
|
native int GetClientIdleTime(int client);
|
||||||
|
|
||||||
public SharedPlugin __pl_AfkManager =
|
public SharedPlugin __pl_AFKManager =
|
||||||
{
|
{
|
||||||
name = "AfkManager",
|
name = "AFKManager",
|
||||||
file = "AfkManager.smx",
|
file = "AFKManager.smx",
|
||||||
#if defined REQUIRE_PLUGIN
|
#if defined REQUIRE_PLUGIN
|
||||||
required = 1,
|
required = 1,
|
||||||
#else
|
#else
|
||||||
@ -17,7 +17,7 @@ public SharedPlugin __pl_AfkManager =
|
|||||||
};
|
};
|
||||||
|
|
||||||
#if !defined REQUIRE_PLUGIN
|
#if !defined REQUIRE_PLUGIN
|
||||||
public __pl_AfkManager_SetNTVOptional()
|
public __pl_AFKManager_SetNTVOptional()
|
||||||
{
|
{
|
||||||
MarkNativeAsOptional("GetClientIdleTime");
|
MarkNativeAsOptional("GetClientIdleTime");
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include <connect>
|
#include <connect>
|
||||||
|
|
||||||
#undef REQUIRE_PLUGIN
|
#undef REQUIRE_PLUGIN
|
||||||
#include <AfkManager>
|
#include <AFKManager>
|
||||||
#include <GFLClanru>
|
#include <GFLClanru>
|
||||||
#include <entWatch>
|
#include <entWatch>
|
||||||
#define REQUIRE_PLUGIN
|
#define REQUIRE_PLUGIN
|
||||||
@ -11,7 +11,7 @@
|
|||||||
#pragma semicolon 1
|
#pragma semicolon 1
|
||||||
#pragma newdecls required
|
#pragma newdecls required
|
||||||
|
|
||||||
bool g_Plugin_AfkManager;
|
bool g_Plugin_AFKManager;
|
||||||
bool g_Plugin_GFLClanru;
|
bool g_Plugin_GFLClanru;
|
||||||
bool g_Plugin_entWatch;
|
bool g_Plugin_entWatch;
|
||||||
|
|
||||||
@ -38,12 +38,12 @@ public void OnPluginStart()
|
|||||||
|
|
||||||
public void OnAllPluginsLoaded()
|
public void OnAllPluginsLoaded()
|
||||||
{
|
{
|
||||||
g_Plugin_AfkManager = LibraryExists("AfkManager");
|
g_Plugin_AFKManager = LibraryExists("AFKManager");
|
||||||
g_Plugin_GFLClanru = LibraryExists("GFLClanru");
|
g_Plugin_GFLClanru = LibraryExists("GFLClanru");
|
||||||
g_Plugin_entWatch = LibraryExists("entWatch");
|
g_Plugin_entWatch = LibraryExists("entWatch");
|
||||||
|
|
||||||
LogMessage("ReservedSlots capabilities:\nAfkManager: %s\nGFLClanru: %s\nentWatch: %s",
|
LogMessage("ReservedSlots capabilities:\nAFKManager: %s\nGFLClanru: %s\nentWatch: %s",
|
||||||
(g_Plugin_AfkManager ? "loaded" : "not loaded"),
|
(g_Plugin_AFKManager ? "loaded" : "not loaded"),
|
||||||
(g_Plugin_GFLClanru ? "loaded" : "not loaded"),
|
(g_Plugin_GFLClanru ? "loaded" : "not loaded"),
|
||||||
(g_Plugin_entWatch ? "loaded" : "not loaded"));
|
(g_Plugin_entWatch ? "loaded" : "not loaded"));
|
||||||
}
|
}
|
||||||
@ -149,7 +149,7 @@ stock bool KickValidClient(const char[] sName, const char[] sSteam32ID, AdminId
|
|||||||
int ConnectionTime = RoundToNearest(GetClientTime(client));
|
int ConnectionTime = RoundToNearest(GetClientTime(client));
|
||||||
|
|
||||||
int IdleTime;
|
int IdleTime;
|
||||||
if(g_Plugin_AfkManager)
|
if(g_Plugin_AFKManager)
|
||||||
IdleTime = GetClientIdleTime(client);
|
IdleTime = GetClientIdleTime(client);
|
||||||
else // Fall back to highest connection time.
|
else // Fall back to highest connection time.
|
||||||
IdleTime = ConnectionTime;
|
IdleTime = ConnectionTime;
|
||||||
|
@ -1 +1 @@
|
|||||||
../../../AfkManager/scripting/include/AfkManager.inc
|
../../../AFKManager/scripting/include/AFKManager.inc
|
Loading…
Reference in New Issue
Block a user