From bec07d150ef81040b4d949760fc18ac54a8bac19 Mon Sep 17 00:00:00 2001 From: Dolly132 <109222243+Dolly132@users.noreply.github.com> Date: Sun, 25 Jan 2026 23:14:31 +0200 Subject: [PATCH] fix(entwatch): Correct native usage --- addons/sourcemod/scripting/ButtonNotifier.sp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/addons/sourcemod/scripting/ButtonNotifier.sp b/addons/sourcemod/scripting/ButtonNotifier.sp index e5bc8e0..bca4091 100644 --- a/addons/sourcemod/scripting/ButtonNotifier.sp +++ b/addons/sourcemod/scripting/ButtonNotifier.sp @@ -33,7 +33,7 @@ public Plugin myinfo = name = "Button & Triggers Notifier", author = "Silence, maxime1907, .Rushaway", description = "Logs button and trigger presses to the chat.", - version = "2.1.2", + version = "2.1.3", url = "" }; @@ -286,13 +286,14 @@ public void TriggerTouched(const char[] output, int caller, int activator, float public void ButtonPressed(const char[] output, int caller, int activator, float delay) { -#if defined _EntWatch_include - if (!IsValidClient(activator) || !IsValidEntity(caller) || EntWatch_IsSpecialItem(caller)) -#else if (!IsValidClient(activator) || !IsValidEntity(caller)) -#endif return; +#if defined _EntWatch_include + int parent = GetEntPropEnt(caller, Prop_Data, "m_hParent"); + if (IsValidEntity(parent) && EntWatch_IsSpecialItem(parent)) + return; +#endif int currentTime = GetTime(); char entity[64];