Misc improvements to certain plugins

Fixed bug in SprayManager.sp
Added sm_setscore and sm_setteamscore to ExtraCommands.sp
Misc improvements to Status.sp (serverfps.inc made by GoD-Tony, I just
updated win sig)
Logging and misc improvements to Teleport.sp
This commit is contained in:
Obuss
2016-11-30 13:40:59 -06:00
parent ebbb7b4d62
commit 4037006f98
6 changed files with 466 additions and 217 deletions
+50
View File
@@ -0,0 +1,50 @@
#if defined _serverfps_included
#endinput
#endif
#define _serverfps_included
#include <sourcemod>
#include <sdktools>
stock float GetServerFPS()
{
return 1.0 / view_as<float>(LoadFromAddress(GetHostTimeFrame(), NumberType_Int32));
}
/*
* Internal Functions
*/
stock Handle GetServerFPSConf()
{
static Handle hGameConf = null;
if (hGameConf == null)
{
hGameConf = LoadGameConfigFile("serverfps.games");
if (hGameConf == null)
{
SetFailState("Couldn't find \"serverfps.games\" configuration file");
}
}
return hGameConf;
}
stock Address GetHostTimeFrame()
{
static Address pHostTimeFrame = Address_Null;
if (pHostTimeFrame == Address_Null)
{
pHostTimeFrame = GameConfGetAddress(GetServerFPSConf(), "HostTimeFrame");
if (pHostTimeFrame == Address_Null)
{
SetFailState("Failed to find time frame address");
}
}
return pHostTimeFrame;
}