Commit Graph
4 Commits
Author SHA1 Message Date
A1m` 07fc524d27 Fixed incorrect use of ReferenceToIndex, which caused some functions to be unstable during client connection. (#2)
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.
2026-07-13 21:39:04 +00:00
Kyle Sanderson e360802700 We're using GPLv3, and only v3. 2015-01-17 14:36:24 -08:00
KyleSanderson 9b9e3d98f2 Use Client AuthString for CSteamID if available. 2014-01-29 02:31:11 -07:00
KyleSanderson e5e3807329 Add UserStats to project. 2014-01-12 18:37:20 -07:00