Raised This Month: $ Target: $400
 0% 

Block Duck on rotating entitys


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
uxMal
Member
Join Date: Oct 2007
Old 10-20-2009 , 17:24   Block Duck on rotating entitys
Reply With Quote #1

hey,

i don't want players to duck on entitys like func_rotating, func_door_rotating..

i wrote some code which already works but it just blocks your duck if your on the entity, if you jump and duck in jump and land on the entity in duck you won't stand up but still ducking...

i tried set_pev(id, pev_bInDuck, 0) or client_cmd(id,"-duck") but you can still duck on these entitys if you duck before in air...

heres my code

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


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



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

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)
                                                        
            }
        }
    }
    
}
//-------------------------------------------------------------------------------------------------- 
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