mirror of
https://github.com/Nereziel/cs2-WeaponPaints.git
synced 2026-02-25 12:52:17 +00:00
Improved player index
The latest version of cssharp adds player.Index instead of entityIndex and does not allow to compile
This commit is contained in:
@@ -229,9 +229,9 @@ namespace WeaponPaints
|
||||
|
||||
internal async Task SyncWeaponPaintsToDatabase(CCSPlayerController? player)
|
||||
{
|
||||
if (!Utility.IsPlayerValid(player)) return;
|
||||
if (player == null || !Utility.IsPlayerValid(player)) return;
|
||||
|
||||
int playerIndex = (int)player!.EntityIndex!.Value.Value;
|
||||
int playerIndex = (int)player.Index;
|
||||
string steamId = new SteamID(player.SteamID).SteamId64.ToString();
|
||||
|
||||
using var connection = new MySqlConnection(_databaseConnectionString);
|
||||
|
||||
Reference in New Issue
Block a user