Do not use deprecated GetClientAuthString native.

This commit is contained in:
Richard Helgeby 2015-03-21 15:45:29 +01:00
parent 5ec3694535
commit 542d3d345e
2 changed files with 5 additions and 7 deletions

View File

@ -199,7 +199,6 @@ ClassOnClientDisconnect(client)
ClassOnClientSpawn(client) ClassOnClientSpawn(client)
{ {
decl String:originalmodel[PLATFORM_MAX_PATH]; decl String:originalmodel[PLATFORM_MAX_PATH];
decl String:steamid[16];
decl String:classname[64]; decl String:classname[64];
new filter[ClassFilter]; new filter[ClassFilter];
@ -241,12 +240,11 @@ ClassOnClientSpawn(client)
// Mark player as not in admin mode. // Mark player as not in admin mode.
ClassPlayerInAdminMode[client] = false; ClassPlayerInAdminMode[client] = false;
// Get random class setting and steam id. // Get random class setting.
new bool:randomclass = GetConVarBool(g_hCvarsList[CVAR_CLASSES_RANDOM]); new bool:randomclass = GetConVarBool(g_hCvarsList[CVAR_CLASSES_RANDOM]);
GetClientAuthString(client, steamid, sizeof(steamid));
// Assign random classes if enabled. Always do it for bots. // Assign random classes if enabled. Always do it for bots.
if (randomclass || StrEqual(steamid, "BOT")) if (randomclass || IsFakeClient(client))
{ {
// Setup filtering // Setup filtering
// --------------- // ---------------

View File

@ -57,8 +57,8 @@ stock bool:SteamidCacheAddClient(Handle:steamidcache, client)
} }
// Get client's SteamID. // Get client's SteamID.
decl String:steamid[STEAMIDCACHE_MAX_LENGTH]; new String:steamid[STEAMIDCACHE_MAX_LENGTH];
GetClientAuthString(client, steamid, sizeof(steamid)); GetClientAuthId(client, AuthId_SteamID64, steamid, sizeof(steamid), true);
// Push SteamID into the SteamID cache. // Push SteamID into the SteamID cache.
PushArrayString(steamidcache, steamid); PushArrayString(steamidcache, steamid);
@ -78,7 +78,7 @@ stock bool:SteamidCacheClientExists(Handle:steamidcache, client)
{ {
// Get client's SteamID. // Get client's SteamID.
decl String:steamid[STEAMIDCACHE_MAX_LENGTH]; decl String:steamid[STEAMIDCACHE_MAX_LENGTH];
GetClientAuthString(client, steamid, sizeof(steamid)); GetClientAuthId(client, AuthId_SteamID64, steamid, sizeof(steamid), true);
// Return true if client was found, false otherwise. // Return true if client was found, false otherwise.
return (FindStringInArray(steamidcache, steamid) != -1); return (FindStringInArray(steamidcache, steamid) != -1);