v1.2.3-git157
While this function works well with the client indexes we pass in, as its name suggests, we should essentially be passing player references, not client indexes. The problem is that SourceMod looks for this player in the entity list, but they might not be there when connecting, or they might be another client or a bot. This makes the code unstable and confusing, and it works intermittently. Steam doesn't care whether the player is in the entity list—it works with the Steam ID. Using ReferenceToIndex here is fundamentally wrong and causes random -1 errors, especially during OnClientConnect when the entity may not exist yet. This commit replaces it with a direct client index lookup, which is correct and reliable because params[1] is already a client index.
Fixed incorrect use of ReferenceToIndex, which caused some functions to be unstable during client connection. (#2)
SteamWorks
Exposing SteamWorks functions to SourcePawn.
Languages
C++
56.2%
Pawn
31%
Python
7.8%
SourcePawn
3.1%
C
1.9%