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:
parent
b85d4ae41e
commit
ac3d641406
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user