From f00d153a94689eab71f3a38f8de32701faf155c6 Mon Sep 17 00:00:00 2001 From: Rushaway Date: Sun, 16 Aug 2026 13:37:59 +0200 Subject: [PATCH] fix: prevent invalid client index crash on connect CS_GetClientClanTag was called from OnClientConnected, before the client entity actually exists, causing "Client index N is not valid" exceptions on connect. Move the lookup to OnClientPutInServer, where the entity is guaranteed to be valid. --- addons/sourcemod/scripting/VIP_Tag.sp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/sourcemod/scripting/VIP_Tag.sp b/addons/sourcemod/scripting/VIP_Tag.sp index d3a5feb..af1fa0e 100644 --- a/addons/sourcemod/scripting/VIP_Tag.sp +++ b/addons/sourcemod/scripting/VIP_Tag.sp @@ -15,7 +15,7 @@ public Plugin myinfo = name = "[VIP] Tag", author = "R1KO, maxime1907", description = "Gives a default VIP tag to VIPs", - version = "1.0.1", + version = "1.0.2", url = "" }; @@ -35,7 +35,7 @@ public Action OnToggleItem(int client, const char[] sFeatureName, VIP_ToggleStat return Plugin_Continue; } -public void OnClientConnected(int client) +public void OnClientPutInServer(int client) { if (IsFakeClient(client)) return;