Thanks for the tip, but with this method we can only get those 3 mentioned values (attachement).
EDIT: This will probalby work (1000.0*GetFrameComputationTime()), I will try to update signature and test it.
EDIT2: This works (CSGO, linux only):
PHP Code:
#include <sourcemod>
#include <sdktools>
static Address ptrFPS = Address_Null;
#pragma semicolon 1
#pragma newdecls required
public void OnPluginStart()
{
RegAdminCmd("sm_fps", cmdFPS, ADMFLAG_ROOT, "Test command");
}
public Action cmdFPS(int client, int args)
{
PrintToServer("FPS: %f", GetServerFPS());
return Plugin_Handled;
}
static void LoadSVVarGameConf()
{
Handle hConfig = LoadGameConfigFile("root.game.csgo");
if (hConfig == null)
ThrowError("Failed to load root.game.csgo");
ptrFPS = GameConfGetAddress(hConfig, "HostTimeFrame");
if (ptrFPS == Address_Null)
ThrowError("Failed to look up HostTimeFrame");
delete hConfig;
}
float GetServerFPS()
{
if (ptrFPS == Address_Null)
{
LoadSVVarGameConf();
}
return 1.0/view_as<float>(LoadFromAddress(ptrFPS, NumberType_Int32));
}
Code:
"Games"
{
"csgo"
{
"Addresses"
{
"HostTimeFrame"
{
"linux"
{
"signature" "GetStatsString"
"read" "163"
}
}
}
"Signatures"
{
"GetStatsString"
{
"library" "engine"
"linux" "\x55\x31\xC0\x89\xE5\x57\x56\x53\x81\xEC\xCC\x00\x00\x00\x89\x45\xE0\x89\x45\xE4\x8D\x45\xE4\x8B"
}
}
}
}