Quote:
Originally Posted by hleV
Is that ObjectCaps better than this?
Code:
#include <fakemeta> public plugin_init() register_forward(FM_CmdStart, "fwdCmdStart");
public fwdCmdStart(iCl, iHandle) { static iButtons, iOldButtons;
iButtons = get_uc(iHandle, UC_Buttons);
iOldButtons = pev(iCl, pev_oldbuttons);
if ((iButtons & IN_USE) && !(iOldButtons & IN_USE)) { // Pressed +use } else if (!(iButtons & IN_USE) && (iOldButtons & IN_USE)) { // Unpressed +use } }
|
cmdStart occurs many times per second. I tested once and it happens so often as PreThink. So, when using it, every player is always being checked (many times per second) to see if he is pressing the use key. Even if he is away or spectating.
__________________