- Cerere PLUGIN | Afiseaza codul
Code: Select all
public kick_player( id )
{
if( get_pcvar_num( cvar_active ) == 1 )
{
if( get_pcvar_num( cvar_anti_flood_cfg ) == 1 )
{
/*
new szFirstArg[ 32 ];
read_argv( 1, szFirstArg, sizeof( szFirstArg ) -1 );
new iPlayer = cmd_target( id, szFirstArg, 8 );
*/
new reason[ 144 ];
get_pcvar_string( g_reason, reason, 143 );
switch( get_pcvar_num( g_proceed_type ) )
{
case 1:
{
color_chat( id, ".v[.nServer-Protection.v].n Esti suspectat de.e CFG FLOOD.n, la urmatoarele.v %i.n incercari, vei primi.e BAN.n !", incercari );
incercari++;
}
case 2:
{
color_chat( id, ".v[.nServer-Protection.v].n Esti suspectat de.e CFG FLOOD.n, la urmatoarele.v %i.n incercari, vei primi.e KICK.n !", incercarix );
incercarix++;
}
case 3:
{
color_chat( id, ".v[.nServer-Protection.v].n Esti suspectat de.e CFG FLOOD.n, iar actiunea ta a fost.v BLOCATA.n !" );
color_chat( 0, ".v[.nServer-Protection.v].n Jucatorul:.e %s.n ( IP:.v %s.n ) a fost prins folosind.e CFG FLOOD.n, si i-am blocat.v ACTIUNEA.n !", GetInfo( id, INFO_NAME ), GetInfo( id, INFO_IP ) );
log_to_file( "server_protection.log", "[Server-Protection] Jucatorul: %s ( IP: %s ) a fost prins folosind CFG FLOOD, si i-am blocat ACTIUNEA !", GetInfo( id, INFO_NAME ), GetInfo( id, INFO_IP ) );
server_cmd( "echo [Server-Protection] Jucatorul: %s ( IP: %s ) a fost prins folosind CFG FLOOD, si i-am blocat ACTIUNEA !", GetInfo( id, INFO_NAME ), GetInfo( id, INFO_IP ) );
}
}
if( incercari == 3 )
{
color_chat( 0, ".v[.nServer-Protection.v].n Jucatorul:.e %s.n ( IP:.v %s.n ) a fost prins folosind.e CFG FLOOD.n, si a fost.v BANAT.n !", GetInfo( id, INFO_NAME ), GetInfo( id, INFO_IP ) );
log_to_file( "server_protection.log", "[Server-Protection] Jucatorul: %s ( IP: %s ) a fost prins folosind CFG FLOOD, si a fost BANAT !", GetInfo( id, INFO_NAME ), GetInfo( id, INFO_IP ) );
server_cmd( "echo [Server-Protection] Jucatorul: %s ( IP: %s ) a fost prins folosind CFG FLOOD, si a fost BANAT !", GetInfo( id, INFO_NAME ), GetInfo( id, INFO_IP ) );
server_cmd( "kick ^"#%i^" ^"%s^"; wait; addip ^"%d^" ^"%s^"; wait; writeip", get_user_userid( id ), reason, get_pcvar_num( g_timp ), GetInfo( id, INFO_IP ) );
set_task( 5.0, "PrintConsoleInfo", id + ELIMINATETASK );
incercari = 0;
}
if( incercarix == 3 )
{
color_chat( 0, ".v[.nServer-Protection.v].n Jucatorul:.e %s.n ( IP:.v %s.n ) a fost prins folosind.e CFG FLOOD.n, si a primit.v KICK.n !", GetInfo( id, INFO_NAME ), GetInfo( id, INFO_IP ) );
log_to_file( "server_protection.log", "[Server-Protection] Jucatorul: %s ( IP: %s ) a fost prins folosind CFG FLOOD, si a primit KICK !", GetInfo( id, INFO_NAME ), GetInfo( id, INFO_IP ) );
server_cmd( "echo [Server-Protection] Jucatorul: %s ( IP: %s ) a fost prins folosind CFG FLOOD, si a primit KICK !", GetInfo( id, INFO_NAME ), GetInfo( id, INFO_IP ) );
server_cmd( "kick ^"#%i^" ^"[Server-Protection] Accesul tau pe server a fost restrictionat momentan !^"", get_user_userid( id ) );
set_task( 5.0, "PrintConsoleInfo", id + ELIMINATETASK );
incercarix = 0;
}
return PLUGIN_HANDLED;
}
}
return PLUGIN_CONTINUE;
}