AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Duck speed & no slowdown (https://forums.alliedmods.net/showthread.php?t=117479)

benamo6 02-01-2010 14:37

Duck speed & no slowdown
 
Ive been looking some codes but I cant get the clean code.
How do I give No slowdown to a player, and make his duck speed equal to his normal speed

ConnorMcLeod 02-01-2010 14:53

Re: Duck speed & no slowdown
 
For duck speed you need orpheu.

For slowdown, set pev_fuser2 to 0.0 in Ham_Player_Jump post registered.

benamo6 02-01-2010 15:11

Re: Duck speed & no slowdown
 
Wath is orpheu?
Is this okay?
PHP Code:

public Player_Jump(id)
{
        static 
iOldButtons iOldButtons pev(idpev_oldbuttons)
        if( 
iOldButtons IN_JUMP && pev(idpev_flags) & FL_ONGROUND)
        {
            
iOldButtons &= ~IN_JUMP
            set_pev
(idpev_oldbuttonsiOldButtons)
            
set_pev(idpev_gaitsequencePLAYER_JUMP)
            
set_pev(idpev_frame0.0)
            return 
HAM_HANDLED
        
}
    return 
HAM_IGNORED



Arkshine 02-01-2010 15:17

Re: Duck speed & no slowdown
 
Orpheu : http://forums.alliedmods.net/showthread.php?t=116393

ConnorMcLeod 02-02-2010 00:46

Re: Duck speed & no slowdown
 
Quote:

Originally Posted by benamo6 (Post 1075406)
Is this okay?

No, and you don't need to force any animation, the game will do it for you.

PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

new const VERSION[] = "0.0.1"

public plugin_init()
{
    
register_plugin("No SlowDown"VERSION"ConnorMcLeod")

    
RegisterHam(Ham_Player_Jump"player""Ham_CbasePlayer_Jump_Post"1)
}

public 
Ham_CbasePlayer_Jump_Postid )
{
    
set_pev(idpev_fuser20.0)


It seems you also want autobhop :

PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

new const VERSION[] = "0.0.1"

public plugin_init()
{
    
register_plugin("No SlowDown"VERSION"ConnorMcLeod")

    
RegisterHam(Ham_Player_Jump"player""Ham_CbasePlayer_Jump_Post"1)
}

public 
Ham_CbasePlayer_Jump_Postid )
{
    
set_pev(idpev_fuser20.0)
    
set_pev(idpev_oldbuttonspev(idpev_oldbuttons) & ~IN_JUMP)



benamo6 02-02-2010 00:58

Re: Duck speed & no slowdown
 
Thanks connor!

Boylive 04-12-2011 14:10

Re: Duck speed & no slowdown
 
i'm use it no happen.
i'm press duck it no duck speed
no all error
why ??

modules i'm use
[ 1] AMX Mod X RUN - amxmodx_mm.dll v1.8.1.3 ini Start ANY
[ 2] POD-Bot mm RUN - podbot_mm.dll vV3B21 ini Chlvl ANY
[ 3] CStrike RUN - cstrike_amxx.dll v1.70 pl1 ANY ANY
[ 4] CSX RUN - csx_amxx.dll v1.8.1.3 pl1 ANY ANY
[ 5] Engine RUN - engine_amxx.dll v1.8.1.3 pl1 ANY ANY
[ 6] FakeMeta RUN - fakemeta_amxx.dl v1.8.1.3 pl1 ANY ANY
[ 7] Fun RUN - fun_amxx.dll v1.8.1.3 pl1 ANY ANY
[ 8] Ham Sandwich RUN - hamsandwich_amxx v1.8.1.3 pl1 ANY ANY
[ 9] MySQL RUN - mysql_amxx.dll v1.8.1.3 pl1 ANY ANY
[10] SQLite RUN - sqlite_amxx.dll v1.8.1.3 pl1 ANY ANY
[11] Orpheu RUN - orpheu_amxx.dll v2.3a pl1 ANY ANY

use in cstrike v1.6


All times are GMT -4. The time now is 07:28.

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