From ac3d641406777fc0c6ee63b8da56e584d50873fc Mon Sep 17 00:00:00 2001 From: Giferns <47265743+Giferns@users.noreply.github.com> Date: Fri, 31 Mar 2023 20:43:57 +0300 Subject: [PATCH] `rg_give_defusekit()`: Add player team check (#234) Add player team check to avoid unexpected behavior --- reapi/src/natives/natives_misc.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reapi/src/natives/natives_misc.cpp b/reapi/src/natives/natives_misc.cpp index a4f6065d..3c2cebd8 100644 --- a/reapi/src/natives/natives_misc.cpp +++ b/reapi/src/natives/natives_misc.cpp @@ -1259,6 +1259,10 @@ cell AMX_NATIVE_CALL rg_give_defusekit(AMX *amx, cell *params) if (CSGameRules() != nullptr && !CSGameRules()->m_bMapHasBombTarget && !CSGameRules()->m_bMapHasBombZone) { return FALSE; } + + if (pPlayer->m_iTeam != CT) { + return FALSE; + } pPlayer->m_bHasDefuser = params[arg_def] ? true : false; pPlayer->pev->body = params[arg_def] ? 1 : 0;