NoSteamPlayerCount: Slight formatting update.
This commit is contained in:
parent
477b7cb010
commit
288346d7d0
@ -29,14 +29,14 @@ public void OnGameFrame()
|
|||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
public void OnPluginStart()
|
public void OnPluginStart()
|
||||||
{
|
{
|
||||||
RegAdminCmd("sm_addfake", Command_addfake, ADMFLAG_ROOT, "");
|
RegAdminCmd("sm_addfake", Command_AddFake, ADMFLAG_ROOT, "");
|
||||||
RegAdminCmd("sm_removefake", Command_removefake, ADMFLAG_ROOT, "");
|
RegAdminCmd("sm_removefake", Command_RemoveFake, ADMFLAG_ROOT, "");
|
||||||
RegAdminCmd("sm_countfakes", Command_countfakes, ADMFLAG_BAN, "");
|
RegAdminCmd("sm_countfakes", Command_CountFakes, ADMFLAG_BAN, "");
|
||||||
|
|
||||||
for(int client = 1; client <= MaxClients; client++)
|
for(int client = 1; client <= MaxClients; client++)
|
||||||
{
|
{
|
||||||
if(IsValidClient(client))
|
if(IsValidClient(client) && IsClientAuthorized(client))
|
||||||
OnClientAuthorized(client, "xxx");
|
OnClientAuthorized(client, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ public void OnPluginEnd()
|
|||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
// Purpose:
|
// Purpose:
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
public Action Command_addfake(int client, int argc)
|
public Action Command_AddFake(int client, int argc)
|
||||||
{
|
{
|
||||||
SteamWorks_CreateFake("Kaitou Sinbad");
|
SteamWorks_CreateFake("Kaitou Sinbad");
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
@ -64,7 +64,7 @@ public Action Command_addfake(int client, int argc)
|
|||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
// Purpose:
|
// Purpose:
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
public Action Command_removefake(int client, int argc)
|
public Action Command_RemoveFake(int client, int argc)
|
||||||
{
|
{
|
||||||
SteamWorks_KickFake();
|
SteamWorks_KickFake();
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
@ -73,7 +73,7 @@ public Action Command_removefake(int client, int argc)
|
|||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
// Purpose:
|
// Purpose:
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
public Action Command_countfakes(int client, int argc)
|
public Action Command_CountFakes(int client, int argc)
|
||||||
{
|
{
|
||||||
int iFakes = SteamWorks_CountFakes();
|
int iFakes = SteamWorks_CountFakes();
|
||||||
ReplyToCommand(client, "There are currently %d Fake Clients active.", iFakes);
|
ReplyToCommand(client, "There are currently %d Fake Clients active.", iFakes);
|
||||||
@ -87,6 +87,7 @@ public void OnClientAuthorized(int client, const char[] auth)
|
|||||||
{
|
{
|
||||||
char sSteamID[32];
|
char sSteamID[32];
|
||||||
GetClientAuthId(client, AuthId_Steam2, sSteamID, sizeof(sSteamID));
|
GetClientAuthId(client, AuthId_Steam2, sSteamID, sizeof(sSteamID));
|
||||||
|
|
||||||
char sName[128];
|
char sName[128];
|
||||||
GetClientName(client, sName, sizeof(sName));
|
GetClientName(client, sName, sizeof(sName));
|
||||||
|
|
||||||
@ -125,8 +126,5 @@ public bool IsValidClient(int client)
|
|||||||
if (!IsClientInGame(client))
|
if (!IsClientInGame(client))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!IsClientAuthorized(client))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user