Raised This Month: $51 Target: $400
 12% 

hmm.. i need plugin jumpstats include jump bug stats


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Aureezz
Junior Member
Join Date: Feb 2013
Location: Indonesia , West Java ,
Old 09-20-2016 , 08:09   hmm.. i need plugin jumpstats include jump bug stats
Reply With Quote #1

I find jumpstats like xj not found include jump bug stats and sound stats ex: ownage and dominating.

can you help me?
Aureezz is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 09-20-2016 , 11:22   Re: hmm.. i need plugin jumpstats include jump bug stats
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?p=783389 (Jump bug not included)

https://forums.alliedmods.net/showthread.php?p=709356 - Enables jumpbug trainer, could be used for stats only in my opinion.

Also xPaw was a great coder. He published all of his plugins ever made for mY.RuN. You might find something usefull in here.

Post from xPaw: https://forums.alliedmods.net/showthread.php?t=266360

All files he published: https://github.com/xPaw/AMXX-Plugins

I found a jumpbug stats code which he coded:

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

#define USE_CONNOR_COLOR_NATIVE // Uncomment this line to use ConnorMcLeod's ChatColor

new const PREFIX[ ] = "[XJ]"// Change to your own if you want to

#if defined USE_CONNOR_COLOR_NATIVE
    #include < chatcolor >
#else
    #include < colorchat >
    
    #define Red RED
    #define client_print_color ColorChat
#endif

new bool:g_bInDmgFall33 ], g_iFrameTime33 ];
new 
g_iOldButtonsg_iButtons;

public 
plugin_init( ) {
    
register_plugin"JumpBug Stats""1.5""Numb" );
    
    
register_forwardFM_CmdStart"FwdCmdStart" );
    
register_forwardFM_PlayerPreThink,  "FM_PlayerPreThink_Pre" );
    
register_forwardFM_PlayerPostThink"FM_PlayerPostThink_Post"true );
}

public 
plugin_precache( )
    
precache_sound"misc/mod_excellent.wav" );

public 
FwdCmdStart( const id, const iHandle )
    
g_iFrameTimeid ] = get_uciHandleUC_Msec );

public 
FM_PlayerPreThink_Pre( const id ) {
    if( !
is_user_aliveid ) || pevidpev_flags ) & FL_ONGROUND || pevidpev_waterlevel ) >= ) {
        
g_bInDmgFallid ] = false;
        
        return;
    }
    
    
g_iButtons    pevidpev_button );
    
g_iOldButtons pevidpev_oldbuttons );
    
    new 
Float:flFallVelocity;
    
pevidpev_flFallVelocityflFallVelocity );
    
    
g_bInDmgFallid ] = bool:( flFallVelocity >= 500.0 );
}

public 
FM_PlayerPostThink_Post( const id ) {
    if( !
g_bInDmgFallid ] || g_iOldButtons IN_JUMP || ~g_iButtons IN_JUMP )
        return;
    
    if( 
g_iOldButtons IN_DUCK && ~pevidpev_flags ) & FL_DUCKING ) {
        new 
Float:vVelocity];
        
pevidpev_velocityvVelocity );
        
        if( 
vVelocity] > 0.0 ) {
            
g_bInDmgFallid ] = false;
            
            
JumpBugMadeid );
        }
    }
}

JumpBugMade( const id ) {
    
//new iDistance = floatround( ( g_flJumpOff[ id ] - vOrigin[ 2 ] ), floatround_floor );
    
new iEngineFps floatround/ ( g_iFrameTimeid ] * 0.001 ) );
    
    new 
szMessage256 ];
    
    
engclient_printidengprint_console"^nSuccessful JumpBug was made! Fall Distance: %i units. Fall Speed: %i u/s. Engine FPS: %i^n", -1, -1iEngineFps );
    
    
formatexszMessage255"Successful JumpBug was made!^nFall Distance: %i units^nFall Speed: %i u/s^nEngine FPS: %i", -1, -1iEngineFps );
    
    
set_hudmessage2551270, -1.00.6506.06.00.70.7);
    
show_hudmessageidszMessage );
    
    
// Print stats to spectators
    
new iPlayers32 ], iNumiSpec;
    
get_playersiPlayersiNum"bch" );
    
    for( new 
iiNumi++ ) {
        
iSpec iPlayers];
        
        if( 
iSpec == pevidpev_iuser2 ) )
            
show_hudmessageiSpecszMessage );
    }
    
    
client_cmd0"spk misc/mod_excellent" );
    
    new 
szName32 ];
    
get_user_nameidszName31 );
    
    
client_print_color0Red"%s %s did JumpBug! Fall distance is %i units with %i u/s."PREFIXszName, -1, -);
    

The next one has edgebug AND jumpbug stats

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

#define USE_CONNOR_COLOR_NATIVE // Uncomment this line to use ConnorMcLeod's ChatColor
#define USE_SOUNDS // Uncomment this if you want to hear sounds

new const PREFIX[ ] = "[XJ]"// Change to your own if you want to

#if defined USE_CONNOR_COLOR_NATIVE
    #include < chatcolor >
#else
    #include < colorchat >
    
    #define Red RED
    #define DontChange GREEN
    #define client_print_color ColorChat
#endif

new g_iForwardJB;
new 
g_iForward;
new 
g_pGravity;
new 
g_iEdgebugs33 ];
new 
g_iFrameTime33 ][ ];

new 
bool:g_bEdgeBug33 ];
new 
bool:g_bFalling33 ];
new 
Float:g_flJumpOff33 ];
new 
Float:g_flTouchedVelocity33 ];

new 
bool:g_bInDmgFall33 ], g_iOldButtonsg_iButtons;

public 
plugin_init( )
{
    new const 
VERSION[ ] = "2.2 [+JB]";
    
    
register_plugin"EdgeBug Stats"VERSION"xPaw" );
    
    
set_pcvar_stringregister_cvar"edgebug_stats"VERSIONFCVAR_SERVER FCVAR_SPONLY ), VERSION );
    
    
register_forwardFM_CmdStart"FwdCmdStart" );
    
    
RegisterHamHam_Player_PostThink"player""FwdHamPlayerPostThink_Post"true );
    
RegisterHamHam_Player_PreThink"player""FwdHamPlayerPreThink" );
    
RegisterHamHam_Touch"player""FwdHamPlayerTouch" );
    
RegisterHamHam_Touch"trigger_teleport""FwdHamTeleportTouch" );
    
    
g_pGravity get_cvar_pointer"sv_gravity" );
    
g_iForward CreateMultiForward"kz_edgebug"ET_IGNOREFP_CELLFP_CELLFP_CELLFP_CELLFP_CELL );
    
g_iForwardJB CreateMultiForward"kz_jumpbug"ET_IGNOREFP_CELLFP_CELLFP_CELLFP_CELL );
}

#if defined USE_SOUNDS
public plugin_precache( )
{
    
precache_sound"jumpstats/excellent.wav" );
    
precache_sound"jumpstats/godlike.wav" );
    
precache_sound"jumpstats/holyshit.wav" );
}
#endif

public client_putinserverid )
{
    
Clearid );
}

public 
FwdCmdStart( const id, const iHandle )
{
    
g_iFrameTimeid ][ ] = g_iFrameTimeid ][ ];
    
g_iFrameTimeid ][ ] = get_uciHandleUC_Msec );
}

public 
FwdHamPlayerPreThink( const id )
{
    if( !
is_user_aliveid ) )
    {
        return;
    }
    else if( 
pevidpev_waterlevel ) > )
    {
        
g_bInDmgFallid ] = false;
        
Clearid );
        return;
    }
    
    static 
iFlags;
    
iFlags pevidpev_flags );
    
    if( ~
iFlags FL_ONGROUND )
    {
        
g_iButtons    pevidpev_button );
        
g_iOldButtons pevidpev_oldbuttons );
        
        new 
Float:flFallVelocity;
        
pevidpev_flFallVelocityflFallVelocity );
        
        
g_bInDmgFallid ] = bool:( flFallVelocity >= 500.0 );
    }
    else
    {
        
g_bInDmgFallid ] = false;
    }
    
    if( !
g_bFallingid ] && ~iFlags FL_ONGROUND )
    {
        
g_bFallingid ] = true;
        
        new 
Float:vAbsMin];
        
pevidpev_absminvAbsMin );
        
        
g_flJumpOffid ] = vAbsMin] + 1.0;
    }
    
    if( 
g_bFallingid ] )
    {
        if( 
iFlags FL_ONGROUND )
        {
            
Clearid );
            return;
        }
        
        if( 
g_bEdgeBugid ] )
        {
            
g_bEdgeBugid ] = false;
            
            new 
Float:vVelocity];
            
pevidpev_velocityvVelocity );
            
            new 
iEngineFps    floatround/ ( g_iFrameTimeid ][ ] * 0.001 ) );
            new 
iPossibleGain 2000 iEngineFps;
            
            new 
Float:flGravityFloat:flSvGravity get_pcvar_floatg_pGravity );
            
pevidpev_gravityflGravity );
            
            if( 
floatabsvVelocity] ) <= iPossibleGain
            
&&  floatabsg_flTouchedVelocityid ] ) > iPossibleGain
            
&&  floatabsvVelocity] + flSvGravity flGravity 0.001 0.5 g_iFrameTimeid ][ ] ) < 0.00009 )
            {
                new 
Float:vOrigin], Float:flFallVelocity;
                
pevidpev_flFallVelocityflFallVelocity );
                
pevidpev_absminvOrigin );
                
                
vOrigin] += 1.0;
                
                new 
iDistance floatround( ( g_flJumpOffid ] - vOrigin] ), floatround_floor );
                
                if( 
iDistance 17 )
                {
                    
Clearid );
                    return;
                }
                
                
PrintMessageidiDistancefloatroundflFallVelocity ), iEngineFps );
                
                
g_flJumpOffid ] = vOrigin];
            }
        }
    }
}

public 
FwdHamPlayerPostThink_Post( const id )
{
    if( !
g_bInDmgFallid ] || g_iOldButtons IN_JUMP || ~g_iButtons IN_JUMP )
    {
        return;
    }
    
    if( !
is_user_aliveid ) )
    {
        
g_bInDmgFallid ] = false;
        return;
    }
    
    if( 
g_iOldButtons IN_DUCK && ~pevidpev_flags ) & FL_DUCKING )
    {
        new 
Float:vOrigin];
        
pevidpev_velocityvOrigin );
        
        if( 
vOrigin] > 0.0 )
        {
            
g_bInDmgFallid ] = false;
            
            if( 
pevidpev_waterlevel ) > )
            {
                
client_printidprint_chat"[JB] Wtf? Water?" );
                return;
            }
            
            new 
Float:flFallVelocity;
            
pevidpev_flFallVelocityflFallVelocity );
            
            if( 
flFallVelocity 0.0 )
            {
                
client_printidprint_chat"[JB] Wtf?" );
                return;
            }
            
            
pevidpev_absminvOrigin );
            
            
vOrigin] += 1.0;
            
            new 
iDistance  floatround( ( g_flJumpOffid ] - vOrigin] ), floatround_floor ),
                
iEngineFps floatround/ ( g_iFrameTimeid ][ ] * 0.001 ) );
            
            
PrintMessageJBidiDistancefloatroundflFallVelocity ), iEngineFps );
            
            
g_flJumpOffid ] = vOrigin];
        }
    }
}

public 
FwdHamPlayerTouch( const id, const iEntity )
{
    if( !
g_bFallingid ] )
    {
        return;
    }
    
    static 
Float:vVelocity];
    
pevidpev_velocityvVelocity );
    
    if( 
vVelocity] >= 0.0 )
    {
        return;
    }
    
    static 
Float:vOrigin];
    
pevidpev_originvOrigin );
    
    new 
Float:flMagic floatabsvOrigin] - floatroundvOrigin], floatround_tozero ) );
    
    if( 
flMagic == 0.03125 || flMagic == 0.96875 // Lt.Rat is watching you !
    
{
        
g_bEdgeBugid ]          = true;
        
g_flTouchedVelocityid ] = vVelocity];
    }
}

public 
FwdHamTeleportTouch( const iEntity, const id )
{
    if( 
<= id <= 32 // g_iMaxPlayers ..
    
{
        
Clearid );
    }
}

Clear( const id )
{
    
g_bEdgeBugid ]  = false;
    
g_bFallingid ]  = false;
    
g_iEdgebugsid ] = 0;
}

PrintMessage( const id, const iDistance, const iSpeed, const iEngineFps )
{
    
g_iEdgebugsid ]++;
    
    new 
szTag10 ], szMessage256 ];
    
    switch( 
g_iEdgebugsid ] )
    {
        case 
1: { }
        case 
2szTag "Double ";
        case 
3szTag "Triple ";
        default: 
formatexszTag9"%ix "g_iEdgebugsid ] );
    }
    
    
engclient_printidengprint_console"^nSuccessful %sEdgeBug was made! Fall Distance: %i units. Fall Speed: %i u/s. Engine FPS: %i^n"szTagiDistanceiSpeediEngineFps );
    
    
formatexszMessage255"Successful %sEdgeBug was made!^nFall Distance: %i units^nFall Speed: %i u/s^nEngine FPS: %i"szTagiDistanceiSpeediEngineFps );
    
    
set_hudmessage2551270, -1.00.6506.06.00.70.7);
    
show_hudmessageidszMessage );
    
    
// Print stats to spectators
    
new iPlayers32 ], iNumiSpec;
    
get_playersiPlayersiNum"bch" );
    
    for( new 
iiNumi++ )
    {
        
iSpec iPlayers];
        
        if( 
iSpec == pevidpev_iuser2 ) )
        {
            
show_hudmessageiSpecszMessage );
        }
    }
    
    
ExecuteForwardg_iForwardiNumidiDistanceiSpeediEngineFpsg_iEdgebugsid ] );
    
    if( 
iSpeed 500 )
    {
        return;
    }
    
    new 
szName32 ];
    
get_user_nameidszName31 );
    
    
client_print_color0iDistance >= 2500 Red DontChange"%s %s did %sEdgeBug! Fall distance is %i units with %i u/s."PREFIXszNameszTagiDistanceiSpeed );
    
#if defined USE_SOUNDS
    
if( iDistance >= 2500 )
        
client_cmd0"spk ^"%s^""g_iEdgebugsid ] > "jumpstats/holyshit.wav" "jumpstats/godlike.wav" );
#endif
}

PrintMessageJB( const id, const iDistance, const iSpeed, const iEngineFps )
{
    new 
szMessage256 ];
    
    
engclient_printidengprint_console"^nSuccessful JumpBug was made! Fall Distance: %i units. Fall Speed: %i u/s. Engine FPS: %i^n"iDistanceiSpeediEngineFps );
    
    
formatexszMessage255"Successful JumpBug was made!^nFall Distance: %i units^nFall Speed: %i u/s^nEngine FPS: %i"iDistanceiSpeediEngineFps );
    
    
set_hudmessage2551270, -1.00.6506.06.00.70.7);
    
show_hudmessageidszMessage );
    
    
// Print stats to spectators
    
new iPlayers32 ], iNumiSpec;
    
get_playersiPlayersiNum"bch" );
    
    for( new 
iiNumi++ )
    {
        
iSpec iPlayers];
        
        if( 
iSpec == pevidpev_iuser2 ) )
        {
            
show_hudmessageiSpecszMessage );
        }
    }
    
    
ExecuteForwardg_iForwardJBiNumidiDistanceiSpeediEngineFps );
    
    if( 
iDistance 500 )
    {
        return;
    }
    
    new 
szName32 ];
    
get_user_nameidszName31 );
    
    
client_print_color0Red"%s %s did JumpBug! Fall distance is %i units with %i u/s."PREFIXszNameiDistanceiSpeed );
    
#if defined USE_SOUNDS
    
if( iDistance >= 1500 )
        
client_cmd0"spk ^"jumpstats/excellent.wav^"" );
#endif

__________________

Last edited by Napoleon_be; 09-21-2016 at 03:50.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Aureezz
Junior Member
Join Date: Feb 2013
Location: Indonesia , West Java ,
Old 09-21-2016 , 09:18   Re: hmm.. i need plugin jumpstats include jump bug stats
Reply With Quote #3

Quote:
Originally Posted by Napoleon_be View Post
https://forums.alliedmods.net/showthread.php?p=783389 (Jump bug not included)

https://forums.alliedmods.net/showthread.php?p=709356 - Enables jumpbug trainer, could be used for stats only in my opinion.

Also xPaw was a great coder. He published all of his plugins ever made for mY.RuN. You might find something usefull in here.

Post from xPaw: https://forums.alliedmods.net/showthread.php?t=266360

All files he published: https://github.com/xPaw/AMXX-Plugins

I found a jumpbug stats code which he coded:

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

#define USE_CONNOR_COLOR_NATIVE // Uncomment this line to use ConnorMcLeod's ChatColor

new const PREFIX[ ] = "[XJ]"// Change to your own if you want to

#if defined USE_CONNOR_COLOR_NATIVE
    #include < chatcolor >
#else
    #include < colorchat >
    
    #define Red RED
    #define client_print_color ColorChat
#endif

new bool:g_bInDmgFall33 ], g_iFrameTime33 ];
new 
g_iOldButtonsg_iButtons;

public 
plugin_init( ) {
    
register_plugin"JumpBug Stats""1.5""Numb" );
    
    
register_forwardFM_CmdStart"FwdCmdStart" );
    
register_forwardFM_PlayerPreThink,  "FM_PlayerPreThink_Pre" );
    
register_forwardFM_PlayerPostThink"FM_PlayerPostThink_Post"true );
}

public 
plugin_precache( )
    
precache_sound"misc/mod_excellent.wav" );

public 
FwdCmdStart( const id, const iHandle )
    
g_iFrameTimeid ] = get_uciHandleUC_Msec );

public 
FM_PlayerPreThink_Pre( const id ) {
    if( !
is_user_aliveid ) || pevidpev_flags ) & FL_ONGROUND || pevidpev_waterlevel ) >= ) {
        
g_bInDmgFallid ] = false;
        
        return;
    }
    
    
g_iButtons    pevidpev_button );
    
g_iOldButtons pevidpev_oldbuttons );
    
    new 
Float:flFallVelocity;
    
pevidpev_flFallVelocityflFallVelocity );
    
    
g_bInDmgFallid ] = bool:( flFallVelocity >= 500.0 );
}

public 
FM_PlayerPostThink_Post( const id ) {
    if( !
g_bInDmgFallid ] || g_iOldButtons IN_JUMP || ~g_iButtons IN_JUMP )
        return;
    
    if( 
g_iOldButtons IN_DUCK && ~pevidpev_flags ) & FL_DUCKING ) {
        new 
Float:vVelocity];
        
pevidpev_velocityvVelocity );
        
        if( 
vVelocity] > 0.0 ) {
            
g_bInDmgFallid ] = false;
            
            
JumpBugMadeid );
        }
    }
}

JumpBugMade( const id ) {
    
//new iDistance = floatround( ( g_flJumpOff[ id ] - vOrigin[ 2 ] ), floatround_floor );
    
new iEngineFps floatround/ ( g_iFrameTimeid ] * 0.001 ) );
    
    new 
szMessage256 ];
    
    
engclient_printidengprint_console"^nSuccessful JumpBug was made! Fall Distance: %i units. Fall Speed: %i u/s. Engine FPS: %i^n", -1, -1iEngineFps );
    
    
formatexszMessage255"Successful JumpBug was made!^nFall Distance: %i units^nFall Speed: %i u/s^nEngine FPS: %i", -1, -1iEngineFps );
    
    
set_hudmessage2551270, -1.00.6506.06.00.70.7);
    
show_hudmessageidszMessage );
    
    
// Print stats to spectators
    
new iPlayers32 ], iNumiSpec;
    
get_playersiPlayersiNum"bch" );
    
    for( new 
iiNumi++ ) {
        
iSpec iPlayers];
        
        if( 
iSpec == pevidpev_iuser2 ) )
            
show_hudmessageiSpecszMessage );
    }
    
    
client_cmd0"spk misc/mod_excellent" );
    
    new 
szName32 ];
    
get_user_nameidszName31 );
    
    
client_print_color0Red"%s %s did JumpBug! Fall distance is %i units with %i u/s."PREFIXszName, -1, -);
    

The next one has edgebug AND jumpbug stats

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

#define USE_CONNOR_COLOR_NATIVE // Uncomment this line to use ConnorMcLeod's ChatColor
#define USE_SOUNDS // Uncomment this if you want to hear sounds

new const PREFIX[ ] = "[XJ]"// Change to your own if you want to

#if defined USE_CONNOR_COLOR_NATIVE
    #include < chatcolor >
#else
    #include < colorchat >
    
    #define Red RED
    #define DontChange GREEN
    #define client_print_color ColorChat
#endif

new g_iForwardJB;
new 
g_iForward;
new 
g_pGravity;
new 
g_iEdgebugs33 ];
new 
g_iFrameTime33 ][ ];

new 
bool:g_bEdgeBug33 ];
new 
bool:g_bFalling33 ];
new 
Float:g_flJumpOff33 ];
new 
Float:g_flTouchedVelocity33 ];

new 
bool:g_bInDmgFall33 ], g_iOldButtonsg_iButtons;

public 
plugin_init( )
{
    new const 
VERSION[ ] = "2.2 [+JB]";
    
    
register_plugin"EdgeBug Stats"VERSION"xPaw" );
    
    
set_pcvar_stringregister_cvar"edgebug_stats"VERSIONFCVAR_SERVER FCVAR_SPONLY ), VERSION );
    
    
register_forwardFM_CmdStart"FwdCmdStart" );
    
    
RegisterHamHam_Player_PostThink"player""FwdHamPlayerPostThink_Post"true );
    
RegisterHamHam_Player_PreThink"player""FwdHamPlayerPreThink" );
    
RegisterHamHam_Touch"player""FwdHamPlayerTouch" );
    
RegisterHamHam_Touch"trigger_teleport""FwdHamTeleportTouch" );
    
    
g_pGravity get_cvar_pointer"sv_gravity" );
    
g_iForward CreateMultiForward"kz_edgebug"ET_IGNOREFP_CELLFP_CELLFP_CELLFP_CELLFP_CELL );
    
g_iForwardJB CreateMultiForward"kz_jumpbug"ET_IGNOREFP_CELLFP_CELLFP_CELLFP_CELL );
}

#if defined USE_SOUNDS
public plugin_precache( )
{
    
precache_sound"jumpstats/excellent.wav" );
    
precache_sound"jumpstats/godlike.wav" );
    
precache_sound"jumpstats/holyshit.wav" );
}
#endif

public client_putinserverid )
{
    
Clearid );
}

public 
FwdCmdStart( const id, const iHandle )
{
    
g_iFrameTimeid ][ ] = g_iFrameTimeid ][ ];
    
g_iFrameTimeid ][ ] = get_uciHandleUC_Msec );
}

public 
FwdHamPlayerPreThink( const id )
{
    if( !
is_user_aliveid ) )
    {
        return;
    }
    else if( 
pevidpev_waterlevel ) > )
    {
        
g_bInDmgFallid ] = false;
        
Clearid );
        return;
    }
    
    static 
iFlags;
    
iFlags pevidpev_flags );
    
    if( ~
iFlags FL_ONGROUND )
    {
        
g_iButtons    pevidpev_button );
        
g_iOldButtons pevidpev_oldbuttons );
        
        new 
Float:flFallVelocity;
        
pevidpev_flFallVelocityflFallVelocity );
        
        
g_bInDmgFallid ] = bool:( flFallVelocity >= 500.0 );
    }
    else
    {
        
g_bInDmgFallid ] = false;
    }
    
    if( !
g_bFallingid ] && ~iFlags FL_ONGROUND )
    {
        
g_bFallingid ] = true;
        
        new 
Float:vAbsMin];
        
pevidpev_absminvAbsMin );
        
        
g_flJumpOffid ] = vAbsMin] + 1.0;
    }
    
    if( 
g_bFallingid ] )
    {
        if( 
iFlags FL_ONGROUND )
        {
            
Clearid );
            return;
        }
        
        if( 
g_bEdgeBugid ] )
        {
            
g_bEdgeBugid ] = false;
            
            new 
Float:vVelocity];
            
pevidpev_velocityvVelocity );
            
            new 
iEngineFps    floatround/ ( g_iFrameTimeid ][ ] * 0.001 ) );
            new 
iPossibleGain 2000 iEngineFps;
            
            new 
Float:flGravityFloat:flSvGravity get_pcvar_floatg_pGravity );
            
pevidpev_gravityflGravity );
            
            if( 
floatabsvVelocity] ) <= iPossibleGain
            
&&  floatabsg_flTouchedVelocityid ] ) > iPossibleGain
            
&&  floatabsvVelocity] + flSvGravity flGravity 0.001 0.5 g_iFrameTimeid ][ ] ) < 0.00009 )
            {
                new 
Float:vOrigin], Float:flFallVelocity;
                
pevidpev_flFallVelocityflFallVelocity );
                
pevidpev_absminvOrigin );
                
                
vOrigin] += 1.0;
                
                new 
iDistance floatround( ( g_flJumpOffid ] - vOrigin] ), floatround_floor );
                
                if( 
iDistance 17 )
                {
                    
Clearid );
                    return;
                }
                
                
PrintMessageidiDistancefloatroundflFallVelocity ), iEngineFps );
                
                
g_flJumpOffid ] = vOrigin];
            }
        }
    }
}

public 
FwdHamPlayerPostThink_Post( const id )
{
    if( !
g_bInDmgFallid ] || g_iOldButtons IN_JUMP || ~g_iButtons IN_JUMP )
    {
        return;
    }
    
    if( !
is_user_aliveid ) )
    {
        
g_bInDmgFallid ] = false;
        return;
    }
    
    if( 
g_iOldButtons IN_DUCK && ~pevidpev_flags ) & FL_DUCKING )
    {
        new 
Float:vOrigin];
        
pevidpev_velocityvOrigin );
        
        if( 
vOrigin] > 0.0 )
        {
            
g_bInDmgFallid ] = false;
            
            if( 
pevidpev_waterlevel ) > )
            {
                
client_printidprint_chat"[JB] Wtf? Water?" );
                return;
            }
            
            new 
Float:flFallVelocity;
            
pevidpev_flFallVelocityflFallVelocity );
            
            if( 
flFallVelocity 0.0 )
            {
                
client_printidprint_chat"[JB] Wtf?" );
                return;
            }
            
            
pevidpev_absminvOrigin );
            
            
vOrigin] += 1.0;
            
            new 
iDistance  floatround( ( g_flJumpOffid ] - vOrigin] ), floatround_floor ),
                
iEngineFps floatround/ ( g_iFrameTimeid ][ ] * 0.001 ) );
            
            
PrintMessageJBidiDistancefloatroundflFallVelocity ), iEngineFps );
            
            
g_flJumpOffid ] = vOrigin];
        }
    }
}

public 
FwdHamPlayerTouch( const id, const iEntity )
{
    if( !
g_bFallingid ] )
    {
        return;
    }
    
    static 
Float:vVelocity];
    
pevidpev_velocityvVelocity );
    
    if( 
vVelocity] >= 0.0 )
    {
        return;
    }
    
    static 
Float:vOrigin];
    
pevidpev_originvOrigin );
    
    new 
Float:flMagic floatabsvOrigin] - floatroundvOrigin], floatround_tozero ) );
    
    if( 
flMagic == 0.03125 || flMagic == 0.96875 // Lt.Rat is watching you !
    
{
        
g_bEdgeBugid ]          = true;
        
g_flTouchedVelocityid ] = vVelocity];
    }
}

public 
FwdHamTeleportTouch( const iEntity, const id )
{
    if( 
<= id <= 32 // g_iMaxPlayers ..
    
{
        
Clearid );
    }
}

Clear( const id )
{
    
g_bEdgeBugid ]  = false;
    
g_bFallingid ]  = false;
    
g_iEdgebugsid ] = 0;
}

PrintMessage( const id, const iDistance, const iSpeed, const iEngineFps )
{
    
g_iEdgebugsid ]++;
    
    new 
szTag10 ], szMessage256 ];
    
    switch( 
g_iEdgebugsid ] )
    {
        case 
1: { }
        case 
2szTag "Double ";
        case 
3szTag "Triple ";
        default: 
formatexszTag9"%ix "g_iEdgebugsid ] );
    }
    
    
engclient_printidengprint_console"^nSuccessful %sEdgeBug was made! Fall Distance: %i units. Fall Speed: %i u/s. Engine FPS: %i^n"szTagiDistanceiSpeediEngineFps );
    
    
formatexszMessage255"Successful %sEdgeBug was made!^nFall Distance: %i units^nFall Speed: %i u/s^nEngine FPS: %i"szTagiDistanceiSpeediEngineFps );
    
    
set_hudmessage2551270, -1.00.6506.06.00.70.7);
    
show_hudmessageidszMessage );
    
    
// Print stats to spectators
    
new iPlayers32 ], iNumiSpec;
    
get_playersiPlayersiNum"bch" );
    
    for( new 
iiNumi++ )
    {
        
iSpec iPlayers];
        
        if( 
iSpec == pevidpev_iuser2 ) )
        {
            
show_hudmessageiSpecszMessage );
        }
    }
    
    
ExecuteForwardg_iForwardiNumidiDistanceiSpeediEngineFpsg_iEdgebugsid ] );
    
    if( 
iSpeed 500 )
    {
        return;
    }
    
    new 
szName32 ];
    
get_user_nameidszName31 );
    
    
client_print_color0iDistance >= 2500 Red DontChange"%s %s did %sEdgeBug! Fall distance is %i units with %i u/s."PREFIXszNameszTagiDistanceiSpeed );
    
#if defined USE_SOUNDS
    
if( iDistance >= 2500 )
        
client_cmd0"spk ^"%s^""g_iEdgebugsid ] > "jumpstats/holyshit.wav" "jumpstats/godlike.wav" );
#endif
}

PrintMessageJB( const id, const iDistance, const iSpeed, const iEngineFps )
{
    new 
szMessage256 ];
    
    
engclient_printidengprint_console"^nSuccessful JumpBug was made! Fall Distance: %i units. Fall Speed: %i u/s. Engine FPS: %i^n"iDistanceiSpeediEngineFps );
    
    
formatexszMessage255"Successful JumpBug was made!^nFall Distance: %i units^nFall Speed: %i u/s^nEngine FPS: %i"iDistanceiSpeediEngineFps );
    
    
set_hudmessage2551270, -1.00.6506.06.00.70.7);
    
show_hudmessageidszMessage );
    
    
// Print stats to spectators
    
new iPlayers32 ], iNumiSpec;
    
get_playersiPlayersiNum"bch" );
    
    for( new 
iiNumi++ )
    {
        
iSpec iPlayers];
        
        if( 
iSpec == pevidpev_iuser2 ) )
        {
            
show_hudmessageiSpecszMessage );
        }
    }
    
    
ExecuteForwardg_iForwardJBiNumidiDistanceiSpeediEngineFps );
    
    if( 
iDistance 500 )
    {
        return;
    }
    
    new 
szName32 ];
    
get_user_nameidszName31 );
    
    
client_print_color0Red"%s %s did JumpBug! Fall distance is %i units with %i u/s."PREFIXszNameiDistanceiSpeed );
    
#if defined USE_SOUNDS
    
if( iDistance >= 1500 )
        
client_cmd0"spk ^"jumpstats/excellent.wav^"" );
#endif

tq bro (y)
Aureezz is offline
Amine Belokda
Senior Member
Join Date: Oct 2015
Location: ML_NOT_FOUND
Old 09-21-2016 , 11:48   Re: hmm.. i need plugin jumpstats include jump bug stats
Reply With Quote #4

Quote:
Originally Posted by Napoleon_be View Post
https://forums.alliedmods.net/showthread.php?p=783389 (Jump bug not included)

https://forums.alliedmods.net/showthread.php?p=709356 - Enables jumpbug trainer, could be used for stats only in my opinion.

Also xPaw was a great coder. He published all of his plugins ever made for mY.RuN. You might find something usefull in here.

Post from xPaw: https://forums.alliedmods.net/showthread.php?t=266360

All files he published: https://github.com/xPaw/AMXX-Plugins

I found a jumpbug stats code which he coded:

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

#define USE_CONNOR_COLOR_NATIVE // Uncomment this line to use ConnorMcLeod's ChatColor

new const PREFIX[ ] = "[XJ]"// Change to your own if you want to

#if defined USE_CONNOR_COLOR_NATIVE
    #include < chatcolor >
#else
    #include < colorchat >
    
    #define Red RED
    #define client_print_color ColorChat
#endif

new bool:g_bInDmgFall33 ], g_iFrameTime33 ];
new 
g_iOldButtonsg_iButtons;

public 
plugin_init( ) {
    
register_plugin"JumpBug Stats""1.5""Numb" );
    
    
register_forwardFM_CmdStart"FwdCmdStart" );
    
register_forwardFM_PlayerPreThink,  "FM_PlayerPreThink_Pre" );
    
register_forwardFM_PlayerPostThink"FM_PlayerPostThink_Post"true );
}

public 
plugin_precache( )
    
precache_sound"misc/mod_excellent.wav" );

public 
FwdCmdStart( const id, const iHandle )
    
g_iFrameTimeid ] = get_uciHandleUC_Msec );

public 
FM_PlayerPreThink_Pre( const id ) {
    if( !
is_user_aliveid ) || pevidpev_flags ) & FL_ONGROUND || pevidpev_waterlevel ) >= ) {
        
g_bInDmgFallid ] = false;
        
        return;
    }
    
    
g_iButtons    pevidpev_button );
    
g_iOldButtons pevidpev_oldbuttons );
    
    new 
Float:flFallVelocity;
    
pevidpev_flFallVelocityflFallVelocity );
    
    
g_bInDmgFallid ] = bool:( flFallVelocity >= 500.0 );
}

public 
FM_PlayerPostThink_Post( const id ) {
    if( !
g_bInDmgFallid ] || g_iOldButtons IN_JUMP || ~g_iButtons IN_JUMP )
        return;
    
    if( 
g_iOldButtons IN_DUCK && ~pevidpev_flags ) & FL_DUCKING ) {
        new 
Float:vVelocity];
        
pevidpev_velocityvVelocity );
        
        if( 
vVelocity] > 0.0 ) {
            
g_bInDmgFallid ] = false;
            
            
JumpBugMadeid );
        }
    }
}

JumpBugMade( const id ) {
    
//new iDistance = floatround( ( g_flJumpOff[ id ] - vOrigin[ 2 ] ), floatround_floor );
    
new iEngineFps floatround/ ( g_iFrameTimeid ] * 0.001 ) );
    
    new 
szMessage256 ];
    
    
engclient_printidengprint_console"^nSuccessful JumpBug was made! Fall Distance: %i units. Fall Speed: %i u/s. Engine FPS: %i^n", -1, -1iEngineFps );
    
    
formatexszMessage255"Successful JumpBug was made!^nFall Distance: %i units^nFall Speed: %i u/s^nEngine FPS: %i", -1, -1iEngineFps );
    
    
set_hudmessage2551270, -1.00.6506.06.00.70.7);
    
show_hudmessageidszMessage );
    
    
// Print stats to spectators
    
new iPlayers32 ], iNumiSpec;
    
get_playersiPlayersiNum"bch" );
    
    for( new 
iiNumi++ ) {
        
iSpec iPlayers];
        
        if( 
iSpec == pevidpev_iuser2 ) )
            
show_hudmessageiSpecszMessage );
    }
    
    
client_cmd0"spk misc/mod_excellent" );
    
    new 
szName32 ];
    
get_user_nameidszName31 );
    
    
client_print_color0Red"%s %s did JumpBug! Fall distance is %i units with %i u/s."PREFIXszName, -1, -);
    

The next one has edgebug AND jumpbug stats

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

#define USE_CONNOR_COLOR_NATIVE // Uncomment this line to use ConnorMcLeod's ChatColor
#define USE_SOUNDS // Uncomment this if you want to hear sounds

new const PREFIX[ ] = "[XJ]"// Change to your own if you want to

#if defined USE_CONNOR_COLOR_NATIVE
    #include < chatcolor >
#else
    #include < colorchat >
    
    #define Red RED
    #define DontChange GREEN
    #define client_print_color ColorChat
#endif

new g_iForwardJB;
new 
g_iForward;
new 
g_pGravity;
new 
g_iEdgebugs33 ];
new 
g_iFrameTime33 ][ ];

new 
bool:g_bEdgeBug33 ];
new 
bool:g_bFalling33 ];
new 
Float:g_flJumpOff33 ];
new 
Float:g_flTouchedVelocity33 ];

new 
bool:g_bInDmgFall33 ], g_iOldButtonsg_iButtons;

public 
plugin_init( )
{
    new const 
VERSION[ ] = "2.2 [+JB]";
    
    
register_plugin"EdgeBug Stats"VERSION"xPaw" );
    
    
set_pcvar_stringregister_cvar"edgebug_stats"VERSIONFCVAR_SERVER FCVAR_SPONLY ), VERSION );
    
    
register_forwardFM_CmdStart"FwdCmdStart" );
    
    
RegisterHamHam_Player_PostThink"player""FwdHamPlayerPostThink_Post"true );
    
RegisterHamHam_Player_PreThink"player""FwdHamPlayerPreThink" );
    
RegisterHamHam_Touch"player""FwdHamPlayerTouch" );
    
RegisterHamHam_Touch"trigger_teleport""FwdHamTeleportTouch" );
    
    
g_pGravity get_cvar_pointer"sv_gravity" );
    
g_iForward CreateMultiForward"kz_edgebug"ET_IGNOREFP_CELLFP_CELLFP_CELLFP_CELLFP_CELL );
    
g_iForwardJB CreateMultiForward"kz_jumpbug"ET_IGNOREFP_CELLFP_CELLFP_CELLFP_CELL );
}

#if defined USE_SOUNDS
public plugin_precache( )
{
    
precache_sound"jumpstats/excellent.wav" );
    
precache_sound"jumpstats/godlike.wav" );
    
precache_sound"jumpstats/holyshit.wav" );
}
#endif

public client_putinserverid )
{
    
Clearid );
}

public 
FwdCmdStart( const id, const iHandle )
{
    
g_iFrameTimeid ][ ] = g_iFrameTimeid ][ ];
    
g_iFrameTimeid ][ ] = get_uciHandleUC_Msec );
}

public 
FwdHamPlayerPreThink( const id )
{
    if( !
is_user_aliveid ) )
    {
        return;
    }
    else if( 
pevidpev_waterlevel ) > )
    {
        
g_bInDmgFallid ] = false;
        
Clearid );
        return;
    }
    
    static 
iFlags;
    
iFlags pevidpev_flags );
    
    if( ~
iFlags FL_ONGROUND )
    {
        
g_iButtons    pevidpev_button );
        
g_iOldButtons pevidpev_oldbuttons );
        
        new 
Float:flFallVelocity;
        
pevidpev_flFallVelocityflFallVelocity );
        
        
g_bInDmgFallid ] = bool:( flFallVelocity >= 500.0 );
    }
    else
    {
        
g_bInDmgFallid ] = false;
    }
    
    if( !
g_bFallingid ] && ~iFlags FL_ONGROUND )
    {
        
g_bFallingid ] = true;
        
        new 
Float:vAbsMin];
        
pevidpev_absminvAbsMin );
        
        
g_flJumpOffid ] = vAbsMin] + 1.0;
    }
    
    if( 
g_bFallingid ] )
    {
        if( 
iFlags FL_ONGROUND )
        {
            
Clearid );
            return;
        }
        
        if( 
g_bEdgeBugid ] )
        {
            
g_bEdgeBugid ] = false;
            
            new 
Float:vVelocity];
            
pevidpev_velocityvVelocity );
            
            new 
iEngineFps    floatround/ ( g_iFrameTimeid ][ ] * 0.001 ) );
            new 
iPossibleGain 2000 iEngineFps;
            
            new 
Float:flGravityFloat:flSvGravity get_pcvar_floatg_pGravity );
            
pevidpev_gravityflGravity );
            
            if( 
floatabsvVelocity] ) <= iPossibleGain
            
&&  floatabsg_flTouchedVelocityid ] ) > iPossibleGain
            
&&  floatabsvVelocity] + flSvGravity flGravity 0.001 0.5 g_iFrameTimeid ][ ] ) < 0.00009 )
            {
                new 
Float:vOrigin], Float:flFallVelocity;
                
pevidpev_flFallVelocityflFallVelocity );
                
pevidpev_absminvOrigin );
                
                
vOrigin] += 1.0;
                
                new 
iDistance floatround( ( g_flJumpOffid ] - vOrigin] ), floatround_floor );
                
                if( 
iDistance 17 )
                {
                    
Clearid );
                    return;
                }
                
                
PrintMessageidiDistancefloatroundflFallVelocity ), iEngineFps );
                
                
g_flJumpOffid ] = vOrigin];
            }
        }
    }
}

public 
FwdHamPlayerPostThink_Post( const id )
{
    if( !
g_bInDmgFallid ] || g_iOldButtons IN_JUMP || ~g_iButtons IN_JUMP )
    {
        return;
    }
    
    if( !
is_user_aliveid ) )
    {
        
g_bInDmgFallid ] = false;
        return;
    }
    
    if( 
g_iOldButtons IN_DUCK && ~pevidpev_flags ) & FL_DUCKING )
    {
        new 
Float:vOrigin];
        
pevidpev_velocityvOrigin );
        
        if( 
vOrigin] > 0.0 )
        {
            
g_bInDmgFallid ] = false;
            
            if( 
pevidpev_waterlevel ) > )
            {
                
client_printidprint_chat"[JB] Wtf? Water?" );
                return;
            }
            
            new 
Float:flFallVelocity;
            
pevidpev_flFallVelocityflFallVelocity );
            
            if( 
flFallVelocity 0.0 )
            {
                
client_printidprint_chat"[JB] Wtf?" );
                return;
            }
            
            
pevidpev_absminvOrigin );
            
            
vOrigin] += 1.0;
            
            new 
iDistance  floatround( ( g_flJumpOffid ] - vOrigin] ), floatround_floor ),
                
iEngineFps floatround/ ( g_iFrameTimeid ][ ] * 0.001 ) );
            
            
PrintMessageJBidiDistancefloatroundflFallVelocity ), iEngineFps );
            
            
g_flJumpOffid ] = vOrigin];
        }
    }
}

public 
FwdHamPlayerTouch( const id, const iEntity )
{
    if( !
g_bFallingid ] )
    {
        return;
    }
    
    static 
Float:vVelocity];
    
pevidpev_velocityvVelocity );
    
    if( 
vVelocity] >= 0.0 )
    {
        return;
    }
    
    static 
Float:vOrigin];
    
pevidpev_originvOrigin );
    
    new 
Float:flMagic floatabsvOrigin] - floatroundvOrigin], floatround_tozero ) );
    
    if( 
flMagic == 0.03125 || flMagic == 0.96875 // Lt.Rat is watching you !
    
{
        
g_bEdgeBugid ]          = true;
        
g_flTouchedVelocityid ] = vVelocity];
    }
}

public 
FwdHamTeleportTouch( const iEntity, const id )
{
    if( 
<= id <= 32 // g_iMaxPlayers ..
    
{
        
Clearid );
    }
}

Clear( const id )
{
    
g_bEdgeBugid ]  = false;
    
g_bFallingid ]  = false;
    
g_iEdgebugsid ] = 0;
}

PrintMessage( const id, const iDistance, const iSpeed, const iEngineFps )
{
    
g_iEdgebugsid ]++;
    
    new 
szTag10 ], szMessage256 ];
    
    switch( 
g_iEdgebugsid ] )
    {
        case 
1: { }
        case 
2szTag "Double ";
        case 
3szTag "Triple ";
        default: 
formatexszTag9"%ix "g_iEdgebugsid ] );
    }
    
    
engclient_printidengprint_console"^nSuccessful %sEdgeBug was made! Fall Distance: %i units. Fall Speed: %i u/s. Engine FPS: %i^n"szTagiDistanceiSpeediEngineFps );
    
    
formatexszMessage255"Successful %sEdgeBug was made!^nFall Distance: %i units^nFall Speed: %i u/s^nEngine FPS: %i"szTagiDistanceiSpeediEngineFps );
    
    
set_hudmessage2551270, -1.00.6506.06.00.70.7);
    
show_hudmessageidszMessage );
    
    
// Print stats to spectators
    
new iPlayers32 ], iNumiSpec;
    
get_playersiPlayersiNum"bch" );
    
    for( new 
iiNumi++ )
    {
        
iSpec iPlayers];
        
        if( 
iSpec == pevidpev_iuser2 ) )
        {
            
show_hudmessageiSpecszMessage );
        }
    }
    
    
ExecuteForwardg_iForwardiNumidiDistanceiSpeediEngineFpsg_iEdgebugsid ] );
    
    if( 
iSpeed 500 )
    {
        return;
    }
    
    new 
szName32 ];
    
get_user_nameidszName31 );
    
    
client_print_color0iDistance >= 2500 Red DontChange"%s %s did %sEdgeBug! Fall distance is %i units with %i u/s."PREFIXszNameszTagiDistanceiSpeed );
    
#if defined USE_SOUNDS
    
if( iDistance >= 2500 )
        
client_cmd0"spk ^"%s^""g_iEdgebugsid ] > "jumpstats/holyshit.wav" "jumpstats/godlike.wav" );
#endif
}

PrintMessageJB( const id, const iDistance, const iSpeed, const iEngineFps )
{
    new 
szMessage256 ];
    
    
engclient_printidengprint_console"^nSuccessful JumpBug was made! Fall Distance: %i units. Fall Speed: %i u/s. Engine FPS: %i^n"iDistanceiSpeediEngineFps );
    
    
formatexszMessage255"Successful JumpBug was made!^nFall Distance: %i units^nFall Speed: %i u/s^nEngine FPS: %i"iDistanceiSpeediEngineFps );
    
    
set_hudmessage2551270, -1.00.6506.06.00.70.7);
    
show_hudmessageidszMessage );
    
    
// Print stats to spectators
    
new iPlayers32 ], iNumiSpec;
    
get_playersiPlayersiNum"bch" );
    
    for( new 
iiNumi++ )
    {
        
iSpec iPlayers];
        
        if( 
iSpec == pevidpev_iuser2 ) )
        {
            
show_hudmessageiSpecszMessage );
        }
    }
    
    
ExecuteForwardg_iForwardJBiNumidiDistanceiSpeediEngineFps );
    
    if( 
iDistance 500 )
    {
        return;
    }
    
    new 
szName32 ];
    
get_user_nameidszName31 );
    
    
client_print_color0Red"%s %s did JumpBug! Fall distance is %i units with %i u/s."PREFIXszNameiDistanceiSpeed );
    
#if defined USE_SOUNDS
    
if( iDistance >= 1500 )
        
client_cmd0"spk ^"jumpstats/excellent.wav^"" );
#endif

Good !!
__________________
Amine Belokda is offline
Send a message via MSN to Amine Belokda
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 12:33.


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