added support for storing the tiers
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
#define PLUGIN_VERSION "1.0"
|
#define PLUGIN_VERSION "1.0"
|
||||||
#include <sourcemod>
|
#include <sourcemod>
|
||||||
#include <geoip>
|
#include <geoip>
|
||||||
|
#include <unloze_playtime>
|
||||||
#include <mapchooser_extended>
|
#include <mapchooser_extended>
|
||||||
#include <cstrike>
|
#include <cstrike>
|
||||||
|
|
||||||
@@ -170,8 +171,11 @@ public void upsert_player(int client)
|
|||||||
|
|
||||||
char sSID[64];
|
char sSID[64];
|
||||||
GetClientAuthId(client, AuthId_Steam2, sSID, sizeof(sSID));
|
GetClientAuthId(client, AuthId_Steam2, sSID, sizeof(sSID));
|
||||||
|
|
||||||
|
int client_tier = GetPlayerTier_native(client);
|
||||||
|
|
||||||
char sQuery[512];
|
char sQuery[512];
|
||||||
Format(sQuery, sizeof(sQuery), "INSERT INTO `playtime_display_players` (`steamid`, `current_name`, `current_country`) VALUES('%s', '%s', '%s') ON DUPLICATE KEY UPDATE `current_name` = '%s', `current_country` = '%s', `last_seen` = CURRENT_TIMESTAMP", sSID, sEscapedName, countryCode, sEscapedName, countryCode);
|
Format(sQuery, sizeof(sQuery), "INSERT INTO `playtime_display_players` (`steamid`, `current_name`, `current_country`, `player_tier`) VALUES('%s', '%s', '%s', '%i') ON DUPLICATE KEY UPDATE `current_name` = '%s', `current_country` = '%s', `last_seen` = CURRENT_TIMESTAMP, `player_tier` = '%i'", sSID, sEscapedName, countryCode, client_tier, sEscapedName, countryCode, client_tier);
|
||||||
g_hDatabase.Query(SQL_FinishedQueryUpsertPlayerCallback, sQuery, GetClientSerial(client), DBPrio_Normal);
|
g_hDatabase.Query(SQL_FinishedQueryUpsertPlayerCallback, sQuery, GetClientSerial(client), DBPrio_Normal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user