AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   enable/disable prethink (https://forums.alliedmods.net/showthread.php?t=217577)

Menethil 06-04-2013 13:17

enable/disable prethink
 
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

TheDS1337 06-04-2013 13:27

Re: enable/disable prethink
 
Quote:

Originally Posted by Menethil (Post 1964483)
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

jimaway 06-04-2013 13:32

Re: enable/disable prethink
 
Code:
new ham_prethink public plugin_init() { ham_prethink = RegisterHam(Ham_Player_PreThink, "player", "fw_prethink") } DisableHamForward(ham_prethink) //disable EnableHamForward(ham_prethink) //enable

Menethil 06-04-2013 13:50

Re: enable/disable prethink
 
Quote:

Originally Posted by jimaway (Post 1964496)
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

TheDS1337 06-04-2013 15:14

Re: enable/disable prethink
 
I think this:
Code:
new ham_prethink
should be:
Code:
new Ham:ham_prethink

fysiks 06-05-2013 04:02

Re: enable/disable prethink
 
Quote:

Originally Posted by DeagLe.Studio (Post 1964577)
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.

claudiuhks 06-05-2013 06:05

Re: enable/disable prethink
 
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 ) {





All times are GMT -4. The time now is 16:22.

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