2
0
mirror of https://github.com/rehlds/reapi.git synced 2025-03-13 05:50:16 +03:00

rg_give_defusekit(): Add player team check (#234)

Add player team check to avoid unexpected behavior
This commit is contained in:
Giferns 2023-03-31 20:43:57 +03:00 committed by GitHub
parent b85d4ae41e
commit ac3d641406
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;