Raised This Month: $ Target: $400
 0% 

enable/disable prethink


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Menethil
Senior Member
Join Date: Aug 2011
Old 06-04-2013 , 13:17   enable/disable prethink
Reply With Quote #1

how to enable prethink for a short period and disable it later. i need for ham but any is good. i'm on the phone cant open sma so if anyone is kind to show me, ty
Menethil is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 06-04-2013 , 13:27   Re: enable/disable prethink
Reply With Quote #2

Quote:
Originally Posted by Menethil View Post
how to enable prethink for a short period and disable it later. i need for ham but any is good. i'm on the phone cant open sma so if anyone is kind to show me, ty
Explain better please :p
TheDS1337 is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 06-04-2013 , 13:32   Re: enable/disable prethink
Reply With Quote #3

Code:
new ham_prethink public plugin_init() { ham_prethink = RegisterHam(Ham_Player_PreThink, "player", "fw_prethink") } DisableHamForward(ham_prethink) //disable EnableHamForward(ham_prethink) //enable
jimaway is offline
Menethil
Senior Member
Join Date: Aug 2011
Old 06-04-2013 , 13:50   Re: enable/disable prethink
Reply With Quote #4

Quote:
Originally Posted by jimaway View Post
Code:
new ham_prethink public plugin_init() { ham_prethink = RegisterHam(Ham_Player_PreThink, "player", "fw_prethink") } DisableHamForward(ham_prethink) //disable EnableHamForward(ham_prethink) //enable
thats it, thanks
Menethil is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 06-04-2013 , 15:14   Re: enable/disable prethink
Reply With Quote #5

I think this:
Code:
new ham_prethink
should be:
Code:
new Ham:ham_prethink
TheDS1337 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-05-2013 , 04:02   Re: enable/disable prethink
Reply With Quote #6

Quote:
Originally Posted by DeagLe.Studio View Post
I think this:
Code:
new ham_prethink
should be:
Code:
new Ham:ham_prethink
NO. The tag should be "HamHook". Learn how to verify before you try to post an answer.
__________________
fysiks is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 06-05-2013 , 06:05   Re: enable/disable prethink
Reply With Quote #7

This is for Ham Sandwich.
If you use Fake Meta, then try:

PHP Code:
new g_Forward;

public 
plugin_precache( )
  
g_Forward register_forwardFM_PlayerPreThink"OnPlayerPreThink" ),
  
set_task60.0"DisablePlayerPreThink" );

public 
DisablePlayerPreThink( )
  
unregister_forwardFM_PlayerPreThinkg_Forward );

public 
OnPlayerPreThinkPlayer ) {


__________________

Last edited by claudiuhks; 06-05-2013 at 06:05.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Reply



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:22.


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