Raised This Month: $ Target: $400
 0% 

Block Duck on rotating entitys


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
uxMal
Member
Join Date: Oct 2007
Old 10-21-2009 , 06:47   Re: Block Duck on rotating entitys
Reply With Quote #11

Oh wow it works now

Thanks to minimiller for client_cmd("WAIT;-duck") ..

The wait was the thing i forgot , now it works properly

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


#define PLUGIN "Deathrun_Anti-Duck-Bug"
#define VERSION "1.0"
#define AUTHOR "ulmax"

#define OFFSET_DUCKTIME 262
#define LINUXDIFF 5

//--------------------------------------------------------------------------------------------------

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_forward(FM_PlayerPreThink,"fwThink");
}
//--------------------------------------------------------------------------------------------------
public fwThink(id) {
    
    
    
    if(
is_user_alive(id) && (pev(id,pev_button) & IN_DUCK)) {
        
        if(
pev(id,pev_groundentity) > 32) {
            new 
cname[32];
            
pev(pev(id,pev_groundentity),pev_classname,cname,31);
            
            if(
containi(cname,"rotating") > 0) {
                
set_pev(idpev_oldbuttonspev(idpev_oldbuttons) | IN_DUCK)
                
//set_pev(id, pev_button, pev(id, pev_button) | IN_DUCK)
                
                
client_cmd(id,"wait;-duck");
            }
        }
    }
    
}
//-------------------------------------------------------------------------------------------------- 
One thing left any chance to check if they are in duck if they are on the rotating so i do not have to spam -duck ?
i tried making an if statement checking bInDuck, PhysicsFlags, fDuckTime and some other shit but it didn't work ...

Is this bad if it spams -duck so often?
uxMal is offline
 



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 17:37.


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