AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Ham] Disabling PreThink (https://forums.alliedmods.net/showthread.php?t=156610)

Xalus 05-09-2011 11:53

[Ham] Disabling PreThink
 
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 :{

ConnorMcLeod 05-09-2011 12:15

Re: [Ham] Disabling PreThink
 
Just filter player index when PreThink is sent ? ..

Xalus 05-09-2011 12:27

Re: [Ham] Disabling PreThink
 
It still uses CPU then...

ProIcons 05-09-2011 12:35

Re: [Ham] Disabling PreThink
 
and what do you afraid of ?:P burning the cpu just with a loop ?:P

ConnorMcLeod 05-09-2011 14:25

Re: [Ham] Disabling PreThink
 
Check that code then : http://forums.alliedmods.net/showthread.php?p=958497


All times are GMT -4. The time now is 04:20.

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