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

[Req] Ban Terrorists Who Retry


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Snake.
Senior Member
Join Date: Jul 2017
Old 05-16-2019 , 18:46   [Req] Ban Terrorists Who Retry
Reply With Quote #1

If terrorists retry in x seconds, they will be banned for x minutes.

Cvars would be cool:

retry_secs
retry_ban_min
Snake. is offline
Send a message via Skype™ to Snake.
ZaX
Senior Member
Join Date: Jan 2015
Old 05-16-2019 , 19:51   Re: [Req] Ban Terrorists Who Retry
Reply With Quote #2

what do you mean retry in x seconds?
here is what you need, but I didnt get the first point

PHP Code:
#include <amxmodx>

new g_Ip[33];
new 
bool:Hackz;
new 
gBanTime;

public 
plugin_init( )
{
    
register_plugin("Terrorist Disconnecter Ban""0.2""Craxor");

    
gBanTime register_cvar"retry_ban_min""5" );
    
Hackz true;

}

public 
client_putinserverid )
{
    if( 
is_user_connectedid ) )
    {
        new 
szUserIp[33];
        
get_user_ipidszUserIpcharsmaxszUserIp ), );

        
copyg_Ip[id], charsmaxg_Ip ), szUserIp );
    }
}

public 
plugin_end( )
    
Hackz false;


public 
client_disconnectid 
{
    if( 
get_user_teamid ) == && Hackz == true )
        
server_cmd("amx_addban %s %i Tero-Retry-Reason "g_Ip[id], get_pcvar_numgBanTime ) );


Last edited by ZaX; 05-16-2019 at 19:51.
ZaX is offline
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 05-16-2019 , 19:57   Re: [Req] Ban Terrorists Who Retry
Reply With Quote #3

PHP Code:
new const TASK_FORBID_RETRY 49736;
new 
cvarRetrySecscvarRetryBanMin;

public 
plugin_init()
{
    
register_plugin("Ban Terrorist on Retry""1.0.0""^Cram");
    
    
register_event("ResetHUD""event_resetHUD""b");
    
register_logevent("logEvent_roundEnd"2"1=Round_End")
    
    
cvarRetrySecs register_cvar("retry_secs""10");
    
cvarRetryBanMin register_cvar("retry_ban_min""5");
}

public 
client_disconnect(id)
{
    if(
get_user_team(id) == && !task_exists(TASK_FORBID_RETRY))
    {
        new 
authID[32];
        
get_user_authid(idauthIDcharsmax(authID));
        
        
server_cmd("amx_addban %s %d ""No retry after %f secs!"""authIDget_pcvar_num(cvarRetryBanMin), get_pcvar_float(cvarRetrySecs));
    }
}

public 
event_resetHUD()
{
    
set_task(get_pcvar_float(cvarRetrySecs), "forbidRetryForTerrorists"TASK_FORBID_RETRY);
}

public 
logEvent_roundEnd()
{
    if(
task_exists(TASK_FORBID_RETRY))
        
remove_task(TASK_FORBID_RETRY);
}

public 
forbidRetryForTerrorists()
{
    return 
PLUGIN_HANDLED;


Last edited by redivcram; 05-16-2019 at 20:03.
redivcram is offline
Snake.
Senior Member
Join Date: Jul 2017
Old 05-17-2019 , 11:43   Re: [Req] Ban Terrorists Who Retry
Reply With Quote #4

Quote:
Originally Posted by redivcram View Post
PHP Code:
new const TASK_FORBID_RETRY 49736;
new 
cvarRetrySecscvarRetryBanMin;

public 
plugin_init()
{
    
register_plugin("Ban Terrorist on Retry""1.0.0""^Cram");
    
    
register_event("ResetHUD""event_resetHUD""b");
    
register_logevent("logEvent_roundEnd"2"1=Round_End")
    
    
cvarRetrySecs register_cvar("retry_secs""10");
    
cvarRetryBanMin register_cvar("retry_ban_min""5");
}

public 
client_disconnect(id)
{
    if(
get_user_team(id) == && !task_exists(TASK_FORBID_RETRY))
    {
        new 
authID[32];
        
get_user_authid(idauthIDcharsmax(authID));
        
        
server_cmd("amx_addban %s %d ""No retry after %f secs!"""authIDget_pcvar_num(cvarRetryBanMin), get_pcvar_float(cvarRetrySecs));
    }
}

public 
event_resetHUD()
{
    
set_task(get_pcvar_float(cvarRetrySecs), "forbidRetryForTerrorists"TASK_FORBID_RETRY);
}

public 
logEvent_roundEnd()
{
    if(
task_exists(TASK_FORBID_RETRY))
        
remove_task(TASK_FORBID_RETRY);
}

public 
forbidRetryForTerrorists()
{
    return 
PLUGIN_HANDLED;

I can't compile it.
Snake. is offline
Send a message via Skype™ to Snake.
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 05-17-2019 , 12:05   Re: [Req] Ban Terrorists Who Retry
Reply With Quote #5

Quote:
Originally Posted by Snake. View Post
I can't compile it.
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Ban Terrorist on Retry"
#define VERSION "1.0.0"
#define AUTHOR "^Cram"

new const TASK_FORBID_RETRY 49736;
new 
cvarRetrySecscvarRetryBanMin;

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("HLTV""event_new_round""a""1=0""2=0")  
    
register_logevent("logEvent_roundEnd"2"1=Round_End")
    
    
cvarRetrySecs register_cvar("retry_secs""10");
    
cvarRetryBanMin register_cvar("retry_ban_min""5");
}

public 
client_disconnect(id)
{
    if(
get_user_team(id) == && !task_exists(TASK_FORBID_RETRY))
    {
        new 
authID[32];
        
get_user_authid(idauthIDcharsmax(authID));
        
        
server_cmd("amx_addban %s %d ^"No retry after %f secs!^""authIDget_pcvar_num(cvarRetryBanMin), get_pcvar_float(cvarRetrySecs));
    }
}

public 
event_new_round()
{
    
set_task(get_pcvar_float(cvarRetrySecs), "forbidRetryForTerrorists"TASK_FORBID_RETRY);
}

public 
logEvent_roundEnd()
{
    if(
task_exists(TASK_FORBID_RETRY))
        
remove_task(TASK_FORBID_RETRY);
}

public 
forbidRetryForTerrorists()
{
    return 
PLUGIN_HANDLED;


Last edited by Fuck For Fun; 05-17-2019 at 14:19.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 05-17-2019 , 13:00   Re: [Req] Ban Terrorists Who Retry
Reply With Quote #6

Why are you using ResetHUD? Simply use
PHP Code:
register_event("HLTV""event_new_round""a""1=0""2=0"
ResetHUD is called on player spawn, when a player connects, when someone uses "fullupdate" client command, demo recording and on round restart attempt.
__________________
edon1337 is offline
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 05-17-2019 , 13:09   Re: [Req] Ban Terrorists Who Retry
Reply With Quote #7

Quote:
Originally Posted by edon1337 View Post
Why are you using ResetHUD? Simply use
PHP Code:
register_event("HLTV""event_new_round""a""1=0""2=0"
ResetHUD is called on player spawn, when a player connects, when someone uses "fullupdate" client command, demo recording and on round restart attempt.
I had no idea ResetHUD is being called from multiple sources.
redivcram is offline
Snake.
Senior Member
Join Date: Jul 2017
Old 05-19-2019 , 05:47   Re: [Req] Ban Terrorists Who Retry
Reply With Quote #8

Quote:
Originally Posted by Fuck For Fun View Post
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Ban Terrorist on Retry"
#define VERSION "1.0.0"
#define AUTHOR "^Cram"

new const TASK_FORBID_RETRY 49736;
new 
cvarRetrySecscvarRetryBanMin;

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("HLTV""event_new_round""a""1=0""2=0")  
    
register_logevent("logEvent_roundEnd"2"1=Round_End")
    
    
cvarRetrySecs register_cvar("retry_secs""10");
    
cvarRetryBanMin register_cvar("retry_ban_min""5");
}

public 
client_disconnect(id)
{
    if(
get_user_team(id) == && !task_exists(TASK_FORBID_RETRY))
    {
        new 
authID[32];
        
get_user_authid(idauthIDcharsmax(authID));
        
        
server_cmd("amx_addban %s %d ^"No retry after %f secs!^""authIDget_pcvar_num(cvarRetryBanMin), get_pcvar_float(cvarRetrySecs));
    }
}

public 
event_new_round()
{
    
set_task(get_pcvar_float(cvarRetrySecs), "forbidRetryForTerrorists"TASK_FORBID_RETRY);
}

public 
logEvent_roundEnd()
{
    if(
task_exists(TASK_FORBID_RETRY))
        
remove_task(TASK_FORBID_RETRY);
}

public 
forbidRetryForTerrorists()
{
    return 
PLUGIN_HANDLED;

It does not work!
Snake. is offline
Send a message via Skype™ to Snake.
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 05-19-2019 , 06:08   Re: [Req] Ban Terrorists Who Retry
Reply With Quote #9

Quote:
Originally Posted by Snake. View Post
It does not work!
Logs ERROR?
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Snake.
Senior Member
Join Date: Jul 2017
Old 05-19-2019 , 08:43   Re: [Req] Ban Terrorists Who Retry
Reply With Quote #10

Quote:
Originally Posted by Fuck For Fun View Post
Logs ERROR?
No plugins works but does not ban the player's authid fully.
Snake. is offline
Send a message via Skype™ to Snake.
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 08:46.


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