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

Solved Improved the player ping Or set fake ping ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 02-21-2022 , 17:42   Improved the player ping Or set fake ping ?
Reply With Quote #1

I found this code on a mod and i want to understand what does this code do, because i don't understand it.
PHP Code:
new g_iOffset[33][2];
new 
g_iArgumentPing[33][3];
new 
g_iPingOverride[33] =
{
    -
1, ...
}
public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_forward(FM_UpdateClientData"Update_Client_Data");    
    
set_task(2.0"TaskCalculateArguments"0""0"b"0);
}

public 
Update_Client_Data(id)
{
    if( !(
pevidpev_button ) & IN_SCORE ) && !( pevidpev_oldbuttons ) & IN_SCORE ) )
        return;
    
    static 
playersending;
    
sending 0;
    
    for( 
player 1player <= g_iMaxClientsplayer++ )
    {
        if( !
is_user_connectedplayer ) )
             continue;
        
        switch( 
sending )
        {
            case 
0:
            {
                
message_beginMSG_ONE_UNRELIABLESVC_PINGS_id );
                
write_byte( ( g_iOffsetplayer ][ ] * 64 ) + ( * ( player ) ) );
                
write_shortg_iArgumentPingplayer ][ ] );
                
sending++;
            }
            
            case 
1:
            {
                
write_byte( ( g_iOffsetplayer ][ ] * 128 ) + ( * ( player ) ) );
                
write_shortg_iArgumentPingplayer ][ ] );
                
sending++;
            }
            
            case 
2:
            {
                
write_byte( ( * ( player ) ) );
                
write_shortg_iArgumentPingplayer ][ ] );
                
write_byte);
                
message_end( );
                
sending 0;
            }
        }
    }
    
    if (
sending)
    {
        
write_byte);
        
message_end( );
    }
}

public 
TaskCalculateArguments()
{
    static 
playerping;
    
    for( 
player 1player <= g_iMaxClientsplayer++ )
    {
        if( 
g_iPingOverrideplayer ] < )
        {
            
ping random_num(-44) + 12;
        }
        else
        {
            
ping g_iPingOverrideplayer ];
        }
        for( 
g_iOffset player ][ ] = 0g_iOffsetplayer ][ ] < 4g_iOffsetplayer ][ ]++ )
        {
            if( ( 
ping g_iOffsetplayer ][ ] ) % == )
            {
                
g_iArgumentPingplayer ][ ] = ( ping g_iOffsetplayer ][ ] ) / 4;
                break;
            }
        }
        
        for (
g_iOffset[player][1] = 0g_iOffset[player][1] < 2g_iOffset[player][1]++)
        {
            if( ( 
ping g_iOffsetplayer ][ ] ) % == )
            {
                
g_iArgumentPingplayer ][ ] = ( ping g_iOffsetplayer ][ ] ) / 2;
                break;
            }
        }
        
g_iArgumentPingplayer ][ ] = ping;
    }

__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 02-25-2022 at 09:01.
Supremache is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 02-22-2022 , 01:59   Re: Improved the player ping Or set fake ping ?
Reply With Quote #2

It is something that looks like it works but it is all fake. That's why it checks if one is pressing down on the scoreboard key.
__________________
DJEarthQuake is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 02-22-2022 , 12:31   Re: Improved the player ping Or set fake ping ?
Reply With Quote #3

So, it's for set a fake ping?
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 02-22-2022 at 12:34.
Supremache is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 02-25-2022 , 00:36   Re: Improved the player ping Or set fake ping ?
Reply With Quote #4

Right; fake! SVC_PINGS is ping when IN_SCORE.
Code:
Ping Faker 1.5

                        /\
  ___                  /  \                  ___
 /   \     __         /    \         __     /
/     \   /  \   _   / <()> \   _   /  \   /
       \_/    \_/ \_/________\_/ \_/    \_/
 __________________/__I___I___\________________
                  /_I___I___I__\
                 /I___I___I___I_\
                /___I___I___I___I\
               /__I___I___I___I___\
              /_I___I___I___I___I__\
             /I___I___I___I___I___I_\
            /___I___I___I___I___I___I\
           /__I___I___I___I___I___I___\
          /_I___I___I___I___I___I___I__\
__________________
DJEarthQuake is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 02-25-2022 , 09:01   Re: Improved the player ping Or set fake ping ?
Reply With Quote #5

I get it, thank you for your reply
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache 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 13:33.


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