diff --git a/src/helpers.cpp b/src/helpers.cpp index 5470d88b..3afa2646 100644 --- a/src/helpers.cpp +++ b/src/helpers.cpp @@ -1952,8 +1952,19 @@ bool GetPlayerInfo(int idx, player_info_s *info) bool res = g_IEngine->GetPlayerInfo(idx, info); if (!res) return res; - // Fix friends ID - info->friendsID = g_pPlayerResource->GetAccountID(idx); + + // First try parsing GUID, should always work unless a server is being malicious + try + { + std::string guid = info->guid; + guid = guid.substr(5, guid.length() - 6); + info->friendsID = std::stoul(guid.c_str()); + } + catch (...) + { + // Fix friends ID with player resource + info->friendsID = g_pPlayerResource->GetAccountID(idx); + } return res; }