Raised This Month: $ Target: $400
 0% 

[Question] 3 Times Retry - Ban


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 01-23-2014 , 15:42   Re: [Question] 3 Times Retry - Ban
Reply With Quote #1

Quote:
Originally Posted by ^SmileY View Post
If is retry 3 times on same map, (Obviusly?) OMG use celltrie()
-.-?

when client make a 3-4 Retry's will getting auto Ban for 30-15 min..that all

same map or another map, who care?

just tell me if you can help and make it..
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 01-23-2014 , 16:16   Re: [Question] 3 Times Retry - Ban
Reply With Quote #2

Quote:
Originally Posted by Fuck For Fun View Post
-.-?

when client make a 3-4 Retry's will getting auto Ban for 30-15 min..that all

same map or another map, who care?

just tell me if you can help and make it..
Well the same map or different map thing makes a difference. If you don't specify a timeframe then somebody who retries 3 times over the course of a year could be banned without even realizing. As stated previously, you couldn't specifically detect the retry command. You could see when people send a client disconnect and if they send a disconnect a number of times within a timeframe, then you could possibly do something.

What if the person is just lagging and goes to another server, and then comes back and it happens again? By that method, you would potentially be banning people who don't understand why.

What are you trying to avoid happening? In your post, you say people are rejoining and then getting some advantage by doing so. Explain the other problem and it may be easier to help you out.
__________________

Last edited by joshknifer; 01-23-2014 at 16:24.
joshknifer is offline
Send a message via Skype™ to joshknifer
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 01-23-2014 , 16:58   Re: [Question] 3 Times Retry - Ban
Reply With Quote #3

Quote:
Originally Posted by joshknifer View Post
Well the same map or different map thing makes a difference. If you don't specify a timeframe then somebody who retries 3 times over the course of a year could be banned without even realizing. As stated previously, you couldn't specifically detect the retry command. You could see when people send a client disconnect and if they send a disconnect a number of times within a timeframe, then you could possibly do something.

What if the person is just lagging and goes to another server, and then comes back and it happens again? By that method, you would potentially be banning people who don't understand why.

What are you trying to avoid happening? In your post, you say people are rejoining and then getting some advantage by doing so. Explain the other problem and it may be easier to help you out.
so 5 retry?

dude if the person is just lagging, he will kicked..that only 1 times, so if you can make it 5 times > ban
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 01-23-2014 , 16:59   Re: [Question] 3 Times Retry - Ban
Reply With Quote #4

You didn't answer the second part of the post. It doesn't matter how many times, it matters what you are trying to avoid, as the solution you requested is at best unreliable.
__________________
joshknifer is offline
Send a message via Skype™ to joshknifer
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 01-24-2014 , 06:57   Re: [Question] 3 Times Retry - Ban
Reply With Quote #5

i understand, i just wanna to know if you can make it also..
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 01-24-2014 , 07:06   Re: [Question] 3 Times Retry - Ban
Reply With Quote #6

I think it is in same map, the retry do not make any sense if it is for to first map and other map..

Use a simple celltrie solve the problem (And not necessary to ban any player)
Search by block reconnect respawn i think you will find the apropriate plugin
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 01-24-2014 , 10:10   Re: [Question] 3 Times Retry - Ban
Reply With Quote #7

dude that my thread not asked about spawn in server when retry or reconnect

just when members make a reconnect or retry to server..i wanna ban him that all..

i just ask again if someone can make it or no -/-
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 01-24-2014 , 11:32   Re: [Question] 3 Times Retry - Ban
Reply With Quote #8

Not Tested, added a cvars to adjust ban time, or only kick player.
And added a times to ban player (default 3)

NOT TESTED!

PHP Code:
#include <amxmodx>

new Trie:g_tSteam;

new 
g_pBan;
new 
g_pTimes;

public 
plugin_init()
{
    
register_plugin("Test","0.0.1","Test");
    
    
g_pBan      register_cvar("amx_bantime","-1");     // -1 disabe Bans only kick, 0 Permanent ban!, > 0 Ban time
    
g_pTimes     register_cvar("amx_maxretrys","3");     // Max Retry Times per map
    
    
g_tSteam TrieCreate();
}

public 
plugin_end() TrieDestroy(g_tSteam);

public 
client_authorized(id)
{
    new 
sSteam[35];
    
get_user_authid(id,sSteam,charsmax(sSteam));

    new 
iCount;
    
    if(
TrieGetCell(g_tSteam,sSteam,iCount))
    {
        new 
iTimes get_pcvar_num(g_pTimes);
        
        if((
iCount >= iTimes) && (iTimes 0))
        {
            new 
iBanTime get_pcvar_num(g_pBan);
            
            if(
iBanTime == -1)
            {
                
server_cmd
                
(
                    
"kick #%d ^"You cannot retry more than %%s in the same map^"",
                    
get_user_userid(id),
                    
iTimes,
                    (
iTimes 1) ? "times" "time"
                
);
            }
            else
            {
                
server_cmd
                
(
                    
"amx_ban #%d %d ^"You cannot retry more than %%s in the same map^"",
                    
get_user_userid(id),
                    
iBanTime,
                    
iTimes,
                    (
iTimes 1) ? "times" "time"
                
);
            }
        }
        else 
TrieSetCell(g_tSteam,sSteam,++iCount);
    }
    else 
TrieSetCell(g_tSteam,sSteam,0);

__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 01-24-2014 at 11:47. Reason: Oops d-.-b LAWL GENIUS
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 01-24-2014 , 15:46   Re: [Question] 3 Times Retry - Ban
Reply With Quote #9

Quote:
Originally Posted by ^SmileY View Post
Not Tested, added a cvars to adjust ban time, or only kick player.
And added a times to ban player (default 3)

NOT TESTED!

PHP Code:
#include <amxmodx>

new Trie:g_tSteam;

new 
g_pBan;
new 
g_pTimes;

public 
plugin_init()
{
    
register_plugin("Test","0.0.1","Test");
    
    
g_pBan      register_cvar("amx_bantime","-1");     // -1 disabe Bans only kick, 0 Permanent ban!, > 0 Ban time
    
g_pTimes     register_cvar("amx_maxretrys","3");     // Max Retry Times per map
    
    
g_tSteam TrieCreate();
}

public 
plugin_end() TrieDestroy(g_tSteam);

public 
client_authorized(id)
{
    new 
sSteam[35];
    
get_user_authid(id,sSteam,charsmax(sSteam));

    new 
iCount;
    
    if(
TrieGetCell(g_tSteam,sSteam,iCount))
    {
        new 
iTimes get_pcvar_num(g_pTimes);
        
        if((
iCount >= iTimes) && (iTimes 0))
        {
            new 
iBanTime get_pcvar_num(g_pBan);
            
            if(
iBanTime == -1)
            {
                
server_cmd
                
(
                    
"kick #%d ^"You cannot retry more than %%s in the same map^"",
                    
get_user_userid(id),
                    
iTimes,
                    (
iTimes 1) ? "times" "time"
                
);
            }
            else
            {
                
server_cmd
                
(
                    
"amx_ban #%d %d ^"You cannot retry more than %%s in the same map^"",
                    
get_user_userid(id),
                    
iBanTime,
                    
iTimes,
                    (
iTimes 1) ? "times" "time"
                
);
            }
        }
        else 
TrieSetCell(g_tSteam,sSteam,++iCount);
    }
    else 
TrieSetCell(g_tSteam,sSteam,0);

well thank, look good but I did not want ban perm, I asked to have ban 15 min..

when the player banned, can you add message "blabla" And I will change it myself?
remove Kick, i dont wanna it.

Last edited by Fuck For Fun; 01-24-2014 at 15:48.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-24-2014 , 15:47   Re: [Question] 3 Times Retry - Ban
Reply With Quote #10

Then set the amx_bantime cvar to your desired time
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou 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 20:34.


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