Raised This Month: $ Target: $400
 0% 

How do you force people to duck


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ehha
SourceMod Donor
Join Date: Apr 2006
Location: Sibiu
Old 05-14-2009 , 12:00   Re: How do you force people to duck
Reply With Quote #1

You need client_cmd(id, "-duck") under client_cmd(id, "+duck").
ehha is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 05-14-2009 , 12:36   Re: How do you force people to duck
Reply With Quote #2

should be: engclient_cmd(id, "+duck;wait;-duck").
you can also try hamsandwich's Ham_Player_Duck.

and you can't hook buttons(+/-) with register_clcmd, you need to hook CmdStart and receive buttons from UC_Buttons.
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-14-2009 , 15:18   Re: How do you force people to duck
Reply With Quote #3

Quote:
Originally Posted by Dores View Post
should be: engclient_cmd(id, "+duck;wait;-duck").
you can also try hamsandwich's Ham_Player_Duck.

and you can't hook buttons(+/-) with register_clcmd, you need to hook CmdStart and receive buttons from UC_Buttons.
I tried to block duck and jump using that with returning handled, supercede, ignored, but still nothing, can you give me an example working code of blocking duck and jump ? :}
__________________
Hunter-Digital is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 05-14-2009 , 15:50   Re: How do you force people to duck
Reply With Quote #4

@Hunter-Digital:
i never said that it would work, i just said that you should try using it.

to block jump and duck you need to hook CmdStart:

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


public plugin_init()
{
    
register_plugin("No Jump & Duck""1.0""Dores");
    
    
register_forward(FM_CmdStart"CmdStart");
}

public 
CmdStart(iduc_handle)
{
    static 
button;
    
button get_uc(uc_handleUC_Buttons);
    
    if (
button IN_JUMP)
        
button &= ~IN_JUMP;
    
    if (
button IN_DUCK)
        
button &= ~IN_DUCK;
    
    
set_uc(uc_handleUC_Buttonsbutton);

__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores 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 01:30.


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