PlayerManager: add sm_debugnosteam
This commit is contained in:
parent
ea02d595f1
commit
340d5db89f
@ -55,9 +55,10 @@ public void OnPluginStart()
|
||||
AddMultiTargetFilter("@steam", Filter_Steam, "Steam Players", false);
|
||||
AddMultiTargetFilter("@nosteam", Filter_NoSteam, "No-Steam Players", false);
|
||||
|
||||
RegConsoleCmd("sm_steam", Command_DisplaySteamStats, "Shows the number of Steam and No-Steam players");
|
||||
RegConsoleCmd("sm_nosteam", Command_DisplaySteamStats, "Shows the number of Steam and No-Steam players");
|
||||
RegConsoleCmd("sm_steam", Command_DisplaySteamStats, "Shows No-Steam players");
|
||||
RegConsoleCmd("sm_nosteam", Command_DisplaySteamStats, "Shows No-Steam players");
|
||||
RegAdminCmd("sm_auth", Command_GetAuth, ADMFLAG_GENERIC, "Retreives the Steam ID of a player");
|
||||
RegAdminCmd("sm_debugnosteam", Command_DebugNoSteam, ADMFLAG_GENERIC, "Retreives the amount of No-Steam players");
|
||||
|
||||
AutoExecConfig();
|
||||
}
|
||||
@ -109,6 +110,30 @@ public Action Command_GetAuth(int client, int args)
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public Action Command_DebugNoSteam(int client, int args)
|
||||
{
|
||||
int iNoSteamAmount;
|
||||
|
||||
for(int i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if(IsClientInGame(i) && !IsFakeClient(i))
|
||||
{
|
||||
char sAuthID[32];
|
||||
GetClientAuthId(i, AuthId_Steam2, sAuthID, sizeof(sAuthID), false);
|
||||
|
||||
if(!SteamClientAuthenticated(sAuthID))
|
||||
iNoSteamAmount++;
|
||||
}
|
||||
}
|
||||
|
||||
ReplyToCommand(client, "[SM] There are currently %d No-Steam Clients online.", iNoSteamAmount);
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user