Raised This Month: $ Target: $400
 0% 

[Ham] Disabling PreThink


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 05-09-2011 , 11:53   [Ham] Disabling PreThink
Reply With Quote #1

How to disable PreThink for only 1 person?

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define PLUGIN "test"
#define VERSION "1.0"
#define AUTHOR "Xalus"

new HamHook:PlayerPreThink[33];

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    for(new 
033i++) {
        
PlayerPreThink[i] = RegisterHam(Ham_Player_PreThink"player""Ham_PlayerPreThink")
        
DisableHamForward(PlayerPreThink[i])
    }
}
public 
client_connect(id)
    
EnableHamForward(PlayerPreThink[id]) 
This way looks stupid, and won't work also :{
__________________
Retired.
Xalus is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-09-2011 , 12:15   Re: [Ham] Disabling PreThink
Reply With Quote #2

Just filter player index when PreThink is sent ? ..
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 05-09-2011 , 12:27   Re: [Ham] Disabling PreThink
Reply With Quote #3

It still uses CPU then...
__________________
Retired.
Xalus is offline
ProIcons
Senior Member
Join Date: Jan 2009
Location: Greece - Salonica
Old 05-09-2011 , 12:35   Re: [Ham] Disabling PreThink
Reply With Quote #4

and what do you afraid of ? burning the cpu just with a loop ?
__________________
function rb return $regsubex($$1-,/(.)/g,$+($chr(2) $+ $chr(3),$r(2,15),$chr(2),\1))
ProIcons is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-09-2011 , 14:25   Re: [Ham] Disabling PreThink
Reply With Quote #5

Check that code then : http://forums.alliedmods.net/showthread.php?p=958497
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
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 04:20.


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