Do not use deprecated GetClientAuthString native.
This commit is contained in:
parent
5ec3694535
commit
542d3d345e
@ -199,7 +199,6 @@ ClassOnClientDisconnect(client)
|
||||
ClassOnClientSpawn(client)
|
||||
{
|
||||
decl String:originalmodel[PLATFORM_MAX_PATH];
|
||||
decl String:steamid[16];
|
||||
decl String:classname[64];
|
||||
new filter[ClassFilter];
|
||||
|
||||
@ -241,12 +240,11 @@ ClassOnClientSpawn(client)
|
||||
// Mark player as not in admin mode.
|
||||
ClassPlayerInAdminMode[client] = false;
|
||||
|
||||
// Get random class setting and steam id.
|
||||
// Get random class setting.
|
||||
new bool:randomclass = GetConVarBool(g_hCvarsList[CVAR_CLASSES_RANDOM]);
|
||||
GetClientAuthString(client, steamid, sizeof(steamid));
|
||||
|
||||
// Assign random classes if enabled. Always do it for bots.
|
||||
if (randomclass || StrEqual(steamid, "BOT"))
|
||||
if (randomclass || IsFakeClient(client))
|
||||
{
|
||||
// Setup filtering
|
||||
// ---------------
|
||||
|
@ -57,8 +57,8 @@ stock bool:SteamidCacheAddClient(Handle:steamidcache, client)
|
||||
}
|
||||
|
||||
// Get client's SteamID.
|
||||
decl String:steamid[STEAMIDCACHE_MAX_LENGTH];
|
||||
GetClientAuthString(client, steamid, sizeof(steamid));
|
||||
new String:steamid[STEAMIDCACHE_MAX_LENGTH];
|
||||
GetClientAuthId(client, AuthId_SteamID64, steamid, sizeof(steamid), true);
|
||||
|
||||
// Push SteamID into the SteamID cache.
|
||||
PushArrayString(steamidcache, steamid);
|
||||
@ -78,7 +78,7 @@ stock bool:SteamidCacheClientExists(Handle:steamidcache, client)
|
||||
{
|
||||
// Get client's SteamID.
|
||||
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 (FindStringInArray(steamidcache, steamid) != -1);
|
||||
|
Loading…
Reference in New Issue
Block a user