Raised This Month: $ Target: $400
 0% 

Blocking Defuse


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 11-26-2006 , 21:07   Re: Blocking Defuse
Reply With Quote #8

If you are going to start blocking buttons its best to use CmdStart:
Code:
register_forward(FM_CmdStart, "CmdStart") public CmdStart(id, uc_handle, random_seed) {     if(!is_user_alive(id)) return FMRES_IGNORED     static buttons     buttons = get_uc(uc_handle, UC_Buttons)     if(buttons & IN_USE) buttons &= ~IN_USE     set_uc(uc_handle, UC_Buttons, buttons)     return FMRES_IGNORED }
Reason above method is more efficient is that it handles when buttons etc do something whereas using PreThink it doesn't.
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz 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 06:56.


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