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.