View Single Post
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-04-2011 , 06:30   Re: How to block PlayerUse ?
Reply With Quote #10

I don't think pev->oldbuttons are used anywhere.
About plugins you are right but pdatas should be checked then instead of oldbuttons, better to make plugins act as the game does.

So, you recommand to do stuff at PreThink (POST) right ?
I recommand PostThink (PRE).

Also, if you don't care about vehicles but only buttons and objects, i recommande EmitSound method that is more efficient and uses less cpu.

Last, m_afButtonPressed can be checked only if button doesn't contain IN_USE and m_afButtonReleased can be check only in the other case, gonna update code later.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 04-04-2011 at 06:36.
ConnorMcLeod is offline