AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Force duck (https://forums.alliedmods.net/showthread.php?t=225798)

ironskillz1 09-09-2013 09:27

Force duck
 
Is it possible to force a player to duck all the time without using orpheu

JusTGo 09-09-2013 10:35

Re: Force duck
 
PHP Code:

/* Plugin generated by Emilioneri */ 

#include <amxmodx> 
#include <amxmisc> 
#include <fakemeta>

#define PLUGIN "Force Duck" 
#define VERSION "1.0" 
#define AUTHOR "Emilioneri" 


public plugin_init() { 
    
register_plugin(PLUGINVERSIONAUTHOR
     
    
// Add your code here... 
    
register_concmd("amx_duck""cmd_duck"ADMIN_SLAY"< name | #userid >"


public 
cmd_duck(idlevelcid

    if (!
cmd_access(idlevelcid2)) 
       return 
PLUGIN_HANDLED 
        
    
new Argument[32
     
    
read_argv(1Argument31
     
    new 
Target cmd_target(idArgument,CMDTARGET_OBEY_IMMUNITY|CMDTARGET_ONLY_ALIVE
     
    if (
Target
    { 
        
set_pev(idpev_buttonpev(idpev_button) & IN_DUCK );
        
client_cmd(id"+duck"
    } 
    return 
PLUGIN_HANDLED 



ironskillz1 09-09-2013 13:27

Re: Force duck
 
Doesnt that only make so you duck in like 1 second?

MrKiller2010 09-09-2013 13:28

Re: Force duck
 
Quote:

Originally Posted by ironskillz1 (Post 2031476)
Doesnt that only make so you duck in like 1 second?

Try it it then if u are not sure...

ironskillz1 09-09-2013 14:18

Re: Force duck
 
1 more question How can i change the speed when you duck?

This didnt work :/
Code:

set_user_maxspeed(player, 400.0)

JusTGo 09-09-2013 14:20

Re: Force duck
 
not it make you duck all time and you need this to unduck:
PHP Code:

/* Plugin generated by Emilioneri */  

#include <amxmodx>  
#include <amxmisc>  
#include <fakemeta> 

#define PLUGIN "Force unDuck"  
#define VERSION "1.0"  
#define AUTHOR "Emilioneri"  


public plugin_init() {  
    
register_plugin(PLUGINVERSIONAUTHOR)  
      
    
// Add your code here...  
    
register_concmd("amx_unduck""cmd_unduck"ADMIN_SLAY"< name | #userid >")  
}  

public 
cmd_unduck(idlevelcid)  
{  
    if (!
cmd_access(idlevelcid2))  
       return 
PLUGIN_HANDLED  
         
    
new Argument[32]  
      
    
read_argv(1Argument31)  
      
    new 
Target cmd_target(idArgument,CMDTARGET_OBEY_IMMUNITY|CMDTARGET_ONLY_ALIVE)  
      
    if (
Target)  
    {  
        
set_pev(idpev_buttonpev(idpev_button) & IN_DUCK ); 
        
client_cmd(id"-duck")  
    }  
    return 
PLUGIN_HANDLED  



ironskillz1 09-09-2013 14:27

Re: Force duck
 
That was not my question but i solved it :)

i had to little speed

i incresed it to
Code:

set_user_maxspeed(player, 1100.0)
then i noticed the speed change :)


All times are GMT -4. The time now is 19:08.

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