Raised This Month: $ Target: $400
 0% 

Am I Crazy? Momma says yes.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 12-21-2007 , 00:15   Am I Crazy? Momma says yes.
Reply With Quote #1

I feel like I must be.

But I have looked at this code very hard. And it's not even that late at night...it's just odd.

I'm blocking weapon fire server sided, both attack and attack2. Just like I normally do. But for some reason, if you fire or attack2 while you are not on the ground (ie. falling or walking off a step) it does not get blocked.

Code:
public fwd_CmdStart( id, uc_handle, seed ) {     if( plugin_enabled() && is_user_alive(id) && has_flamethrower(id, get_user_weapon(id)) )     {         static buttons;         buttons = get_uc( uc_handle, UC_Buttons );                 if( buttons & IN_ATTACK )         {             buttons &= ~IN_ATTACK;                         set_animation( id, sequences:altfirecycle );             client_print( id, print_center, "Firing" );         }         if( buttons & IN_ATTACK2 )         {             buttons &= ~IN_ATTACK2;             client_print( id, print_center, "Attack2 Blocked" );         }         set_uc( uc_handle, UC_Buttons, buttons );         return FMRES_SUPERCEDE;     }     return FMRES_IGNORED; }

The Client_Print always gets sent - even when you are falling (and the block doesn't work).

The block always works when you are on the ground.

I have tried the equivelant of this with FM_PlayerPreThink and the same thing happens.

I can't imagine why it hasn't been noticed before...am I doing something wrong here?

Code:
register_forward( FM_CmdStart, "fwd_CmdStart" ); // Tried post too - same thing
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
 


Thread Tools
Display Modes

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 11:05.


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