Raised This Month: $32 Target: $400
 8% 

I needed help.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
combocarte112
Senior Member
Join Date: Jun 2016
Location: Romania
Old 04-22-2017 , 06:44   I needed help.
Reply With Quote #1

Hello, i have a problem.
Can someone modify this plugin>?
Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta> 

#define dTime 2.0 
#define dTimeCP 3.0

new cvar_Fps, cvar_Check;

new Float:GameTime[33];
new FramesPer[33], CurFps[33], Fps[33];

public plugin_init( ) {

   register_plugin( "AntiDeveloper", "1.0", "None" );
    
   cvar_Fps = register_cvar( "amx_developer_fps_max","150" );
   cvar_Check = register_cvar( "amx_developer_check", "3" );
    
   register_forward( FM_PlayerPreThink,"fwdPlayerPreThink" );
}

public check( )
{
   if( get_pcvar_num( cvar_Check ) < 3 ) 
    set_pcvar_num( cvar_Check, 3 );
}

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



public client_disconnect( id ) 
{
   remove_task( id );
}

public fwdPlayerPreThink( id ) {

   if( is_user_alive( id ) ) {

        GameTime[ id ] = get_gametime( );
            
        if( FramesPer[ id ] >= GameTime[ id ] )
            Fps[ id ] += 1;

        else {
            FramesPer[ id ]    +=1;
            CurFps[ id ]    = Fps[ id ];
            Fps[ id ]        = 0;
        }

        if( CurFps[ id ] > get_pcvar_num( cvar_Fps ) ) {

            new name[ 32 ],steamid[ 32 ];
            get_user_name( id,name,31 );
            get_user_authid( id,steamid,31 );

            client_print( 0,print_chat,"[Developer] %s<%s> a fost detectat cu %i FPS",name,steamid,CurFps[id] ); 

            check();

            console_print( id, "[Developer] %s a fost scanat cu succes [1/3]",name );
            console_print( id, "[Developer] %s a fost scanat cu succes [2/3]",name );
            console_print( id, "[Developer] %s a fost scanat cu succes [3/3]",name );

            user_kill( id, 1 );
            client_print( 0,print_chat,"[Developer] %s<%s> a luat  slay pentru ca joaca cu %i FPS [3/3]",name,steamid,CurFps[id] );
            
                    
        }
                
   }
    
   return FMRES_IGNORED;
}
After the player is scanned 3 times to receive slay not "kick".
Sorry for my bad english, I hope I made myself clear.
Thanks.
combocarte112 is offline
Send a message via Skype™ to combocarte112
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-22-2017 , 08:39   Re: I needed help.
Reply With Quote #2

PHP Code:
server_cmd("kick #%i"get_user_userid(id)) 
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Reply


Thread Tools
Display Modes

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 02:25.


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