added a stringmap to store steam ID's so during plugins lifetime it only shows the menu once when connecting
This commit is contained in:
parent
61568dc032
commit
890e2e1418
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
Database g_hDatabase;
|
Database g_hDatabase;
|
||||||
char g_cTimeRecords[18][256];
|
char g_cTimeRecords[18][256];
|
||||||
|
StringMap g_SteamIDShown;
|
||||||
|
|
||||||
public Plugin myinfo =
|
public Plugin myinfo =
|
||||||
{
|
{
|
||||||
@ -17,6 +18,7 @@ public Plugin myinfo =
|
|||||||
|
|
||||||
public void OnPluginStart()
|
public void OnPluginStart()
|
||||||
{
|
{
|
||||||
|
g_SteamIDShown = new StringMap();
|
||||||
if (!g_hDatabase)
|
if (!g_hDatabase)
|
||||||
{
|
{
|
||||||
Database.Connect(SQL_OnDatabaseConnect, "unloze_playtimestats");
|
Database.Connect(SQL_OnDatabaseConnect, "unloze_playtimestats");
|
||||||
@ -137,5 +139,14 @@ public void OnClientPostAdminCheck(int client)
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Command_topactivity(client, 0);
|
|
||||||
|
char steamId[64];
|
||||||
|
GetClientAuthId(client, AuthId_Steam2, steamId, sizeof(steamId));
|
||||||
|
bool nothing;
|
||||||
|
if (g_SteamIDShown.GetValue(steamId, nothing))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Command_topactivity(client, 0);
|
||||||
|
g_SteamIDShown.SetValue(steamId, 1);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user