2
0
mirror of https://github.com/rehlds/reapi.git synced 2025-03-15 15:00:27 +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

@ -1260,6 +1260,10 @@ cell AMX_NATIVE_CALL rg_give_defusekit(AMX *amx, cell *params)
return FALSE; return FALSE;
} }
if (pPlayer->m_iTeam != CT) {
return FALSE;
}
pPlayer->m_bHasDefuser = params[arg_def] ? true : false; pPlayer->m_bHasDefuser = params[arg_def] ? true : false;
pPlayer->pev->body = params[arg_def] ? 1 : 0; pPlayer->pev->body = params[arg_def] ? 1 : 0;