Page 1 of 1

How to block PlayerUse ?

Posted: Sun Oct 04, 2026 3:27 pm
by Archive-Poster
If you want to block PlayerUse, than I would suggest to change pev_button at FM_PlayerPreThink pre to:

Code: Select all

new iButtons = pev(id, pev_button);
if( iButtons&IN_USE )
{
iButtons &= ~IN_USE;
set_pev(id, pev_button, iButtons);
set_pdata_cbase(id, m_afButtonPressed, iButtons, 5); // offsetid 246
} 
This should fix the problems related with USE if they exist.