Raised This Month: $ Target: $400
 0% 

[PROBLEM SOLVED]Problem catching pre pre think +commands


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SubStream
Veteran Member
Join Date: Aug 2005
Location: USA
Old 04-01-2006 , 18:45   [PROBLEM SOLVED]Problem catching pre pre think +commands
Reply With Quote #1

here is what I have so far
Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fakemeta> new const gs_PLUGIN[]   = "test" new const gs_VERSION[]  = "1.0" new const gs_AUTHOR[]   = "SubStream" new gi_players[32] new gi_playercnt new gi_playernum new gi_playerID public plugin_init () {     register_plugin ( gs_PLUGIN, gs_VERSION, gs_AUTHOR )     register_forward ( FM_PlayerPreThink, "fn_hookprethink" ) } public fn_hookprethink ( id ) {     if ( get_user_button ( id ) & IN_ATTACK )     {         entity_set_int ( id, EV_INT_button, get_user_button ( id ) & ~IN_ATTACK )                 fn_saymessage ()                 return FMRES_SUPERCEDE     }         else     {         return FMRES_IGNORED     } } public fn_saymessage () {     get_players ( gi_players, gi_playercnt, "ch" )         for ( gi_playernum = 0; gi_playernum < gi_playercnt; gi_playernum++ )     {         gi_playerID = gi_players[gi_playernum]                 client_print ( gi_playerID, print_center, "hello its working" )                 return PLUGIN_HANDLED     }         return PLUGIN_HANDLED }

I am testing to see if I can block +attack... I have read other forums threads in here about this but haven't got it working yet ... I have looked up as much as I can and according to other topics posted this is supposed to work but its not. Can someone tell me what I am doing wrong I appreciate any help to actually get this working. My goal is to block +attack.

The message shows up when I press the attack button, but I am still allowed to fire.

I already looked at Restricting buttons if you need to reference to where I got my information.

Edit:

Ven solved the problem. Thank you Ven I appreciate it.
SubStream is offline
 


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 16:46.


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