Raised This Month: $ Target: $400
 0% 

General hamsandwich questions


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 06-20-2009 , 14:24   Re: General hamsandwich questions
Reply With Quote #4

Quote:
Originally Posted by hleV View Post
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.
__________________

Last edited by joaquimandrade; 06-20-2009 at 14:28.
joaquimandrade is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode