Поиск Anti-SR plugin

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
86
Реакции
2
Hi. Does someone have an anti-sr plugin? I've tested all the plugins that i've found and nothing is like i want to be. Now i'm using this one wich is kind of what i want but it's not enough. The scroll still works and i don't want too like in FASTCUP and yeah, i know that they are using gameguard to do that but i hope that is there a chance to find what i want. Sorry for my bad english...

I want to be ON only CTRL = +duck to be able to make SILENT-RUN from CTRL key and MWHEELDOWN / MWHEELUP to not work with +duck, only +jump to be ON ( work )

Код:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

new last_stand[33],Float:duck_start_time[33],Float:last_origin[33][3]

public plugin_init()
{
    register_plugin("Anti DD Scroll", "1.0", "Empower")
    register_forward(FM_CmdStart, "pfw_CmdStart", 1)
    RegisterHam(Ham_Spawn, "player", "Ham_Spawn_Pre")

    register_cvar("adds_version", "1.0", FCVAR_SERVER | FCVAR_SPONLY)
}

public Ham_Spawn_Pre(id)
{
    arrayset(last_origin[id], 0.0, sizeof(last_origin[]))
    duck_start_time[id] = 0.0
}

public pfw_CmdStart(id, pUC, seed)
{
    new iButtons = get_uc(pUC, UC_Buttons)
 
    // just ducked
    if(iButtons & IN_DUCK)
    {
        if(last_stand[id])
        {
            pev(id,pev_origin,last_origin[id])
         
            duck_start_time[id] = get_gametime() 
            last_stand[id] = false;
        }
     
    }
    // just got up
    else
    {
        if(!last_stand[id])
        {
            new Float:fGameTime = get_gametime()
         
            // So low time, this is scroll for sure, block duck.
            if((fGameTime-duck_start_time[id])<0.02)
            {
                engfunc(EngFunc_SetOrigin, id, last_origin[id])
                set_pev(id, pev_bInDuck, false);
            }
        }
        last_stand[id] = true;
    }
}
 
Сообщения
368
Реакции
5
Предупреждения
5
Помог
1 раз(а)
I want to too, but it seems that a bad code is still possible for a duck and no one will write to you
 
Сообщения
491
Реакции
89
Помог
5 раз(а)
claudiuandrei10, test it?
Код:
/**
*
* Anti DoubleDuck (DoubleDuck Blocker)
*  by Numb
*
*
* Description:
*  Permanently blocks player ability to doubleduck.
*
*
* Requires:
*  FakeMeta
*
*
* Additional Info:
*  + Tested in Counter-Strike 1.6 with amxmodx 1.8.1. But should work with all Half-Life mods and some older amxx versions.
*
*
* Notes:
*  + I'm begging Valve to not use any ideas of this plugin for future updates of CS/CZ.
*  + If your game mod is not Counter-Strike / Condition-Zero, you should take a look on plugins config.
*
*
* ChangeLog:
*
*  + 1.7
*  - Changed: Client-side doubleduck block uses almost twice less CPU power.
*
*  + 1.6
*  - Fixed: There was one frame delay during what player was fully ducked while trying to doubleduck.
*  - Changed: Plugin uses a bit less resources.
*
*  + 1.5
*  - Added: Config in source code to disable client-side doubleduck block (when disabled uses less resources).
*  - Changed: Plugin uses a bit less resources.
*
*  + 1.4
*  - Fixed: Client-side bug moving up. (Suggesting to use sv_stepsize 17 instead of standard 18, but there aren't much blocks where you are going up more than 16 units.)
*
*  + 1.3
*  - Fixed: If user is lagy and in a run - client-side doubleduck block isn't working properly.
*  - Fixed: If user just landed and doubleducked client-side doubleduck block isn't working all the time (depends from ping).
*  - Fixed: Client-side doubleduck block not working properly in random map areas.
*  - Fixed: If user just unducked and made a doubleduck - client-side doubleduck block isn't working all the time (depends from ping).
*
*  + 1.2
*  - Added: Client-side doubleduck block.
*
*  + 1.1
*  - Changed: Made 1-based array (lower CPU usage).
*  - Changed: Modified check when user is pre-doubleducking - now uses only 1 variable (lower cpu usage).
*
*  + 1.0
*  - First release.
*
*
* Downloads:
*  Amx Mod X forums: http://forums.alliedmods.net/showthread.php?p=619219
*
**/



// ========================================================================= CONFIG START =========================================================================

// Comment this line if you need more CPU or you don't want to block client-side doubleduck.
#define BLOCK_CLIENT_SIDE_DD_VIEW // default: enabled (uncommented)



// If you are using client-side doubleduck block (this is just a start of upcoming configs):
#if defined BLOCK_CLIENT_SIDE_DD_VIEW // this is only a notification (but a needed one) - do not change/remove it.


// Please write any world-view gun model what is automatically downloaded by the engine.
#define ENTITY_MDL "models/w_awp.mdl" // default: ("models/w_awp.mdl") (for use in cs/cz)

// Class-Name of anti-doubleduck entity.
#define ENTITY_NAME "anti_doubleducker" // default: ("anti_doubleducker")


#endif // this is only a notification (but a needed one) - do not change/remove it.

// ========================================================================== CONFIG END ==========================================================================



#include <amxmodx>
#include <fakemeta>

#define PLUGIN_NAME    "Anti DoubleDuck"
#define PLUGIN_VERSION "1.7"
#define PLUGIN_AUTHOR  "Numb"

#if defined BLOCK_CLIENT_SIDE_DD_VIEW
#define ENTITY_NAME "anti_doubleducker"

new g_iFakeEnt;
#endif
new bool:g_bIsUserDead[33];

public plugin_init()
{
    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);

    register_event("ResetHUD", "Event_ResetHUD", "be");
    register_event("Health",   "Event_Health",   "bd", "1=0");

    register_forward(FM_PlayerPreThink, "FM_PlayerPreThink_Pre", 0);

#if defined BLOCK_CLIENT_SIDE_DD_VIEW
    if( (g_iFakeEnt=engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target")))>0 ) // if anti-doubleduck entity created successfully:
    {
        set_pev(g_iFakeEnt, pev_classname,  ENTITY_NAME);       // lets register entity as non-standard
        set_pev(g_iFakeEnt, pev_solid,      SOLID_NOT);         // why it should be solid to the server engine?
        set_pev(g_iFakeEnt, pev_movetype,   MOVETYPE_NONE);     // lets make it unmovable
        set_pev(g_iFakeEnt, pev_rendermode, kRenderTransAlpha); // we are starting to render it in invisible mode
        set_pev(g_iFakeEnt, pev_renderamt,  0.0);               // setting visibility level to zero (invinsible)
  
        engfunc(EngFunc_SetModel, g_iFakeEnt, ENTITY_MDL); // we are setting model so client-side trace scan cold detect the entity
        engfunc(EngFunc_SetSize, g_iFakeEnt, Float:{-16.0, -16.0, 53.0}, Float:{16.0, 16.0, 54.0}); // plugin will use less power if we wont change entity size at each FM_AddToFullPack
  
        register_forward(FM_AddToFullPack, "FM_AddToFullPack_Pre", 0); // now we enable main and most important part of client-side double-duck block
    }
#endif
}

public client_connect(iPlrId)
    g_bIsUserDead[iPlrId] = true;

public Event_ResetHUD(iPlrId)
    g_bIsUserDead[iPlrId] = false;

public Event_Health(iPlrId)
    g_bIsUserDead[iPlrId] = true;

public FM_PlayerPreThink_Pre(iPlrId)
{
    if( g_bIsUserDead[iPlrId] )
        return FMRES_IGNORED;
  
    if( pev(iPlrId, pev_oldbuttons)&IN_DUCK && !(pev(iPlrId, pev_button)&IN_DUCK) ) // if user unpressed duck key
    {
        static s_iFlags;
        s_iFlags = pev(iPlrId, pev_flags);
        if( !(s_iFlags&FL_DUCKING) && pev(iPlrId, pev_bInDuck) ) // if user wasn't fully ducked and is in ducking process
        {
            set_pev(iPlrId, pev_bInDuck, false); // set user not in ducking process
            set_pev(iPlrId, pev_flags, (s_iFlags|FL_DUCKING)); // set user fully fucked
            engfunc(EngFunc_SetSize, iPlrId, Float:{-16.0, -16.0, -25.0}, Float:{16.0, 16.0, 25.0}); // set user size as fully ducked (won't take one frame delay)
        }
    }

    return FMRES_IGNORED;
}

#if defined BLOCK_CLIENT_SIDE_DD_VIEW
public FM_AddToFullPack_Pre(iEsHandle, iE, iEnt, iPlrId, iHostFlags, iPlayer, iPSet)
{
    if( iEnt==g_iFakeEnt )
    {
        if( g_bIsUserDead[iPlrId] )     // we are just blocking the function if user is dead cause why on earth we need it in this case (plus saves a bit of inet speed)
            return FMRES_SUPERCEDE; // also I would block it if user is on ladder or in water, but it's unneeded CPU usage cause this two cases are rare
  
        static Float:s_fFallSpeed;
        pev(iPlrId, pev_flFallVelocity, s_fFallSpeed);
        if( s_fFallSpeed>=0.0 ) // vertical speed is always 0.0 if user is on ground, so we aren't checking FL_ONGROUND existence. Plus we need a check is user falling down
        {
            static Float:s_fOrigin[3];
            pev(iPlrId, pev_origin, s_fOrigin); // lets get player origin
      
            if( pev(iPlrId, pev_flags)&FL_DUCKING ) // this part teleports anti-doubleduck entity 17 units above player head
                s_fOrigin[2] += s_fFallSpeed?2.0:18.0; // or right on players head if he is falling down to avoid instant double-duck after landing
            else // and yes - if player is ducked we must teleport it a bit higher comparing to player center
                s_fOrigin[2] -= s_fFallSpeed?16.0:0.0;
      
            //set_es(iEsHandle, ES_Origin, s_fOrigin); // don't care asking me why this doesn't work in certain areas - I really dunno. if it did - CPU would be much better...
            engfunc(EngFunc_SetOrigin, iEnt, s_fOrigin); // cause ES_Origin doesn't work I use this one (the one what takes all of this power)
      
            forward_return(FMV_CELL, dllfunc(DLLFunc_AddToFullPack, iEsHandle, iE, iEnt, iPlrId, iHostFlags, iPlayer, iPSet));
            // cause ES_Origin doesn't work I forward my own function and block original one to
            // save CPU by not hooking it twice like I did in 1.6 and older versions of plugin
      
            set_es(iEsHandle, ES_Solid, SOLID_BBOX); // now we are making anti-doubleduck entity solid to the client engine
      
            return FMRES_SUPERCEDE;
        }
        return FMRES_SUPERCEDE; // now we block original AddToFullPack cause or we already forwarded our own one or to save and server
                    // and client CPU and internet power cause we don't need this entity to be sent to client this frame
    }

    return FMRES_IGNORED;
}
#endif
 
Сообщения
86
Реакции
2
claudiuandrei10, test it?
Код:
/**
*
* Anti DoubleDuck (DoubleDuck Blocker)
*  by Numb
*
*
* Description:
*  Permanently blocks player ability to doubleduck.
*
*
* Requires:
*  FakeMeta
*
*
* Additional Info:
*  + Tested in Counter-Strike 1.6 with amxmodx 1.8.1. But should work with all Half-Life mods and some older amxx versions.
*
*
* Notes:
*  + I'm begging Valve to not use any ideas of this plugin for future updates of CS/CZ.
*  + If your game mod is not Counter-Strike / Condition-Zero, you should take a look on plugins config.
*
*
* ChangeLog:
*
*  + 1.7
*  - Changed: Client-side doubleduck block uses almost twice less CPU power.
*
*  + 1.6
*  - Fixed: There was one frame delay during what player was fully ducked while trying to doubleduck.
*  - Changed: Plugin uses a bit less resources.
*
*  + 1.5
*  - Added: Config in source code to disable client-side doubleduck block (when disabled uses less resources).
*  - Changed: Plugin uses a bit less resources.
*
*  + 1.4
*  - Fixed: Client-side bug moving up. (Suggesting to use sv_stepsize 17 instead of standard 18, but there aren't much blocks where you are going up more than 16 units.)
*
*  + 1.3
*  - Fixed: If user is lagy and in a run - client-side doubleduck block isn't working properly.
*  - Fixed: If user just landed and doubleducked client-side doubleduck block isn't working all the time (depends from ping).
*  - Fixed: Client-side doubleduck block not working properly in random map areas.
*  - Fixed: If user just unducked and made a doubleduck - client-side doubleduck block isn't working all the time (depends from ping).
*
*  + 1.2
*  - Added: Client-side doubleduck block.
*
*  + 1.1
*  - Changed: Made 1-based array (lower CPU usage).
*  - Changed: Modified check when user is pre-doubleducking - now uses only 1 variable (lower cpu usage).
*
*  + 1.0
*  - First release.
*
*
* Downloads:
*  Amx Mod X forums: http://forums.alliedmods.net/showthread.php?p=619219
*
**/



// ========================================================================= CONFIG START =========================================================================

// Comment this line if you need more CPU or you don't want to block client-side doubleduck.
#define BLOCK_CLIENT_SIDE_DD_VIEW // default: enabled (uncommented)



// If you are using client-side doubleduck block (this is just a start of upcoming configs):
#if defined BLOCK_CLIENT_SIDE_DD_VIEW // this is only a notification (but a needed one) - do not change/remove it.


// Please write any world-view gun model what is automatically downloaded by the engine.
#define ENTITY_MDL "models/w_awp.mdl" // default: ("models/w_awp.mdl") (for use in cs/cz)

// Class-Name of anti-doubleduck entity.
#define ENTITY_NAME "anti_doubleducker" // default: ("anti_doubleducker")


#endif // this is only a notification (but a needed one) - do not change/remove it.

// ========================================================================== CONFIG END ==========================================================================



#include <amxmodx>
#include <fakemeta>

#define PLUGIN_NAME    "Anti DoubleDuck"
#define PLUGIN_VERSION "1.7"
#define PLUGIN_AUTHOR  "Numb"

#if defined BLOCK_CLIENT_SIDE_DD_VIEW
#define ENTITY_NAME "anti_doubleducker"

new g_iFakeEnt;
#endif
new bool:g_bIsUserDead[33];

public plugin_init()
{
    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);

    register_event("ResetHUD", "Event_ResetHUD", "be");
    register_event("Health",   "Event_Health",   "bd", "1=0");

    register_forward(FM_PlayerPreThink, "FM_PlayerPreThink_Pre", 0);

#if defined BLOCK_CLIENT_SIDE_DD_VIEW
    if( (g_iFakeEnt=engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target")))>0 ) // if anti-doubleduck entity created successfully:
    {
        set_pev(g_iFakeEnt, pev_classname,  ENTITY_NAME);       // lets register entity as non-standard
        set_pev(g_iFakeEnt, pev_solid,      SOLID_NOT);         // why it should be solid to the server engine?
        set_pev(g_iFakeEnt, pev_movetype,   MOVETYPE_NONE);     // lets make it unmovable
        set_pev(g_iFakeEnt, pev_rendermode, kRenderTransAlpha); // we are starting to render it in invisible mode
        set_pev(g_iFakeEnt, pev_renderamt,  0.0);               // setting visibility level to zero (invinsible)
 
        engfunc(EngFunc_SetModel, g_iFakeEnt, ENTITY_MDL); // we are setting model so client-side trace scan cold detect the entity
        engfunc(EngFunc_SetSize, g_iFakeEnt, Float:{-16.0, -16.0, 53.0}, Float:{16.0, 16.0, 54.0}); // plugin will use less power if we wont change entity size at each FM_AddToFullPack
 
        register_forward(FM_AddToFullPack, "FM_AddToFullPack_Pre", 0); // now we enable main and most important part of client-side double-duck block
    }
#endif
}

public client_connect(iPlrId)
    g_bIsUserDead[iPlrId] = true;

public Event_ResetHUD(iPlrId)
    g_bIsUserDead[iPlrId] = false;

public Event_Health(iPlrId)
    g_bIsUserDead[iPlrId] = true;

public FM_PlayerPreThink_Pre(iPlrId)
{
    if( g_bIsUserDead[iPlrId] )
        return FMRES_IGNORED;
 
    if( pev(iPlrId, pev_oldbuttons)&IN_DUCK && !(pev(iPlrId, pev_button)&IN_DUCK) ) // if user unpressed duck key
    {
        static s_iFlags;
        s_iFlags = pev(iPlrId, pev_flags);
        if( !(s_iFlags&FL_DUCKING) && pev(iPlrId, pev_bInDuck) ) // if user wasn't fully ducked and is in ducking process
        {
            set_pev(iPlrId, pev_bInDuck, false); // set user not in ducking process
            set_pev(iPlrId, pev_flags, (s_iFlags|FL_DUCKING)); // set user fully fucked
            engfunc(EngFunc_SetSize, iPlrId, Float:{-16.0, -16.0, -25.0}, Float:{16.0, 16.0, 25.0}); // set user size as fully ducked (won't take one frame delay)
        }
    }

    return FMRES_IGNORED;
}

#if defined BLOCK_CLIENT_SIDE_DD_VIEW
public FM_AddToFullPack_Pre(iEsHandle, iE, iEnt, iPlrId, iHostFlags, iPlayer, iPSet)
{
    if( iEnt==g_iFakeEnt )
    {
        if( g_bIsUserDead[iPlrId] )     // we are just blocking the function if user is dead cause why on earth we need it in this case (plus saves a bit of inet speed)
            return FMRES_SUPERCEDE; // also I would block it if user is on ladder or in water, but it's unneeded CPU usage cause this two cases are rare
 
        static Float:s_fFallSpeed;
        pev(iPlrId, pev_flFallVelocity, s_fFallSpeed);
        if( s_fFallSpeed>=0.0 ) // vertical speed is always 0.0 if user is on ground, so we aren't checking FL_ONGROUND existence. Plus we need a check is user falling down
        {
            static Float:s_fOrigin[3];
            pev(iPlrId, pev_origin, s_fOrigin); // lets get player origin
     
            if( pev(iPlrId, pev_flags)&FL_DUCKING ) // this part teleports anti-doubleduck entity 17 units above player head
                s_fOrigin[2] += s_fFallSpeed?2.0:18.0; // or right on players head if he is falling down to avoid instant double-duck after landing
            else // and yes - if player is ducked we must teleport it a bit higher comparing to player center
                s_fOrigin[2] -= s_fFallSpeed?16.0:0.0;
     
            //set_es(iEsHandle, ES_Origin, s_fOrigin); // don't care asking me why this doesn't work in certain areas - I really dunno. if it did - CPU would be much better...
            engfunc(EngFunc_SetOrigin, iEnt, s_fOrigin); // cause ES_Origin doesn't work I use this one (the one what takes all of this power)
     
            forward_return(FMV_CELL, dllfunc(DLLFunc_AddToFullPack, iEsHandle, iE, iEnt, iPlrId, iHostFlags, iPlayer, iPSet));
            // cause ES_Origin doesn't work I forward my own function and block original one to
            // save CPU by not hooking it twice like I did in 1.6 and older versions of plugin
     
            set_es(iEsHandle, ES_Solid, SOLID_BBOX); // now we are making anti-doubleduck entity solid to the client engine
     
            return FMRES_SUPERCEDE;
        }
        return FMRES_SUPERCEDE; // now we block original AddToFullPack cause or we already forwarded our own one or to save and server
                    // and client CPU and internet power cause we don't need this entity to be sent to client this frame
    }

    return FMRES_IGNORED;
}
#endif
Yep. Not what I'm looking for. It is blocking ctrl + mwheel + duck and i want only mwheel
 

Ayk

Сообщения
763
Реакции
478
Помог
19 раз(а)
Сообщения
104
Реакции
-31
Помог
2 раз(а)
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <fun>
#include <hamsandwich>

#pragma semicolon 1

new g_iPlayerGround[MAX_PLAYERS + 1];

public plugin_init()
{
register_plugin("DD interval","1.0","Proffi&&Seroff&&Bibako");
register_forward(FM_CmdStart, "Player_CmdStart");

}



public Player_CmdStart(id, uc_handle)
{

if(g_iPlayerGround[id] && g_iPlayerGround[id] < 0.1) //try increasing or decreasing the interval
{
if(get_pdata_int(id, 247, 5) & (IN_DUCK))
{
return HAM_SUPERCEDE;
}
}

if(pev(id,pev_flags) & FL_ONGROUND )
g_iPlayerGround[id]++;
else
g_iPlayerGround[id] = 0;
return FMRES_IGNORED;
}

public client_putinserver( id ) g_iPlayerGround[id] = 0;
 
Сообщения
86
Реакции
2
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <fun>
#include <hamsandwich>

#pragma semicolon 1

new g_iPlayerGround[MAX_PLAYERS + 1];

public plugin_init()
{
register_plugin("DD interval","1.0","Proffi&&Seroff&&Bibako");
register_forward(FM_CmdStart, "Player_CmdStart");

}



public Player_CmdStart(id, uc_handle)
{

if(g_iPlayerGround[id] && g_iPlayerGround[id] < 0.1) //try increasing or decreasing the interval
{
if(get_pdata_int(id, 247, 5) & (IN_DUCK))
{
return HAM_SUPERCEDE;
}
}

if(pev(id,pev_flags) & FL_ONGROUND )
g_iPlayerGround[id]++;
else
g_iPlayerGround[id] = 0;
return FMRES_IGNORED;
}

public client_putinserver( id ) g_iPlayerGround[id] = 0;
NOT WORKING ! bibako
 
Сообщения
104
Реакции
-31
Помог
2 раз(а)
I understood differently, that the scroll should work. just increase the value to if(g_iPlayerGround[id] && g_iPlayerGround[id] < 0.5)
 
Сообщения
86
Реакции
2
I understood differently, that the scroll should work. just increase the value to if(g_iPlayerGround[id] && g_iPlayerGround[id] < 0.5)
Still not working.... :(
Код:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#pragma semicolon 1
new g_iPlayerGround[MAX_PLAYERS + 1];
public plugin_init()
{
    register_plugin("DD interval","1.0","Proffi&&Seroff&&Bibako");
    register_forward(FM_CmdStart, "Player_CmdStart");
}
public Player_CmdStart(id, uc_handle)
{
    if(g_iPlayerGround[id] && g_iPlayerGround[id] < 0.5)
    {
        if(get_pdata_int(id, 247, 5) & (IN_DUCK))
        {
        return HAM_SUPERCEDE;
        }
    }
    if(pev(id,pev_flags) & FL_ONGROUND )
    g_iPlayerGround[id]++;
    else
    g_iPlayerGround[id] = 0;
    return FMRES_IGNORED;
}
public client_putinserver( id ) g_iPlayerGround[id] = 0;
 
Сообщения
104
Реакции
-31
Помог
2 раз(а)
claudiuandrei10,
#include <amxmodx>
#include <reapi>

#pragma semicolon 1

new g_iPlayerGround[MAX_PLAYERS + 1];

public plugin_init()
{
register_plugin("No Bhop and SGS/DDRun", "1.1", "Denzer");
RegisterHookChain(RG_CBasePlayer_Duck, "CBasePlayer_Duck");
RegisterHookChain(RG_CBasePlayer_PreThink, "CBasePlayer_PreThink");
}

public client_putinserver(id)
{
g_iPlayerGround[id] = 0;
}

public CBasePlayer_Duck(id)
{
if(g_iPlayerGround[id] && g_iPlayerGround[id] < 1.0)
set_entvar(id, var_oldbuttons, get_entvar(id, var_oldbuttons) | IN_DUCK);
}

public CBasePlayer_PreThink(id)
{
if(get_entvar(id, var_flags) & FL_ONGROUND)
g_iPlayerGround[id]++;
else
g_iPlayerGround[id] = 0;
}
 
Сообщения
86
Реакции
2
claudiuandrei10,
#include <amxmodx>
#include <reapi>

#pragma semicolon 1

new g_iPlayerGround[MAX_PLAYERS + 1];

public plugin_init()
{
register_plugin("No Bhop and SGS/DDRun", "1.1", "Denzer");
RegisterHookChain(RG_CBasePlayer_Duck, "CBasePlayer_Duck");
RegisterHookChain(RG_CBasePlayer_PreThink, "CBasePlayer_PreThink");
}

public client_putinserver(id)
{
g_iPlayerGround[id] = 0;
}

public CBasePlayer_Duck(id)
{
if(g_iPlayerGround[id] && g_iPlayerGround[id] < 1.0)
set_entvar(id, var_oldbuttons, get_entvar(id, var_oldbuttons) | IN_DUCK);
}

public CBasePlayer_PreThink(id)
{
if(get_entvar(id, var_flags) & FL_ONGROUND)
g_iPlayerGround[id]++;
else
g_iPlayerGround[id] = 0;
}
test and reply :)
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу