Quote:
Originally Posted by Visual77
Code:
decl String:steamID[64];
if (GetClientAuthId(client, AuthId_Steam2, steamID, sizeof(steamID))) {
PrintToChat(client, "Idiot %N steamID: %s", client, steamID);
}
I guess this is only needed in SM 1.8-1.9 and for CSGO?
There's also "SteamAuthstringValidation" "no" that you can try in configs/core.cfg
|
Common that people do not check the return. See this so often in admin flag and shop plugins and the like using mysql. Random guy will join and use the existing buffered ID, or insert some garbage into the table.
Hilarious when random guy gets admin access or trades away whateversorrysaps credits.
As for not understanding, RTFM its always been there clear as day:
PHP Code:
/**
* Retrieves a client's authentication string (SteamID).
*
* @param client Player index.
* @param auth Buffer to store the client's auth string.
* @param maxlen Maximum length of string buffer (includes NULL terminator).
* @param validate Check backend validation status.
* DO NOT PASS FALSE UNLESS YOU UNDERSTAND THE CONSEQUENCES,
* You WILL KNOW if you need to use this, MOST WILL NOT.
* @return True on success, false otherwise.
* @error If the client is not connected or the index is invalid.
*/
native bool:GetClientAuthString(client, String:auth[], maxlen, bool:validate=true);
/**
* Retrieves a client's authentication string (SteamID).
*
* @param client Player index.
* @param authType Auth id type and format to use.
* @param auth Buffer to store the client's auth id.
* @param maxlen Maximum length of string buffer (includes NULL terminator).
* @param validate Check backend validation status.
* DO NOT PASS FALSE UNLESS YOU UNDERSTAND THE CONSEQUENCES,
* You WILL KNOW if you need to use this, MOST WILL NOT.
* @return True on success, false otherwise.
* @error If the client is not connected or the index is invalid.
*/
native bool:GetClientAuthId(client, AuthIdType:authType, String:auth[], maxlen, bool:validate=true);
__________________