I Need help for my Rcon
#1

I have a server and i troubled with rcon password , i try to set the password to long but it's not work , some members abuse it to use command Rcon they hacked it with any programs and do it ingame, they type banned all the server , i don't have any solutions to unban my members , and how can i block the rcon [When they login , they will be banned with them account] , Plzz help me
P/s : Sorry for my bad english
Reply
#2

Hey there.
It's simple, just add "rcon 0" under the line of the RCON_PASSWORD in the server.cfg, this will disable the RCON Password.(Whoever will try to connect, will get banned.) And by the way, if you want to unban your members, just go to the file SAMP.ban in your server folder, open it with a notepad or any other text-viewer, and remove the bans from there.
I say, first remove the bans from samp.ban, then disable RCON password, because, it will unban some RCON people, who will try to join.

I hope this would help you.
-BenJackster.
Reply
#3

or alternatively you could use something like that (just a rough draft, I fastly created for you)
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    new playerid = -1, cip[20];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            GetPlayerIp(i, cip, sizeof(cip));
            if(!strcmp(ip, cip, true))
            {
                playerid = i;
                break;
            }
        }
    }
    if(playerid != -1)
    {
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        if(strcmp(name, "EnterYourNameHere", true) != 0)
        {
            Ban(playerid);
        }
    }
    return 1;
}
that will ban anyone except "EnterYourNameHere", so you could still login
Reply
#4

Quote:
Originally Posted by Sascha
Посмотреть сообщение
or alternatively you could use something like that (just a rough draft, I fastly created for you)
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    new playerid = -1, cip[20];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            GetPlayerIp(i, cip, sizeof(cip));
            if(!strcmp(ip, cip, true))
            {
                playerid = i;
                break;
            }
        }
    }
    if(playerid != -1)
    {
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        if(strcmp(name, "EnterYourNameHere", true) != 0)
        {
            Ban(playerid);
        }
    }
    return 1;
}
that will ban anyone except "EnterYourNameHere", so you could still login
Can you show me any auto banned ? i need it than , sometimes i need to code and not in the server
Reply
#5

eh what?
Reply
#6

Quote:
Originally Posted by Sascha
Посмотреть сообщение
eh what?
it's when you log in with rcon administrator , u will be get auto banned , no questions or accept to ban
Reply
#7

the code that I wrote will ban anyone who tries to log in into rcon (INGAME). It will automatically ban you, except, if your ingame name is the name you used where I wrote "EnterYourNameHere". So you can enter your ingame name at that and will be able to login into rcon. Anyone else can't.. What you can also do is this:
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(success)
    {
        new playerid = -1, cip[20];
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                GetPlayerIp(i, cip, sizeof(cip));
                if(!strcmp(ip, cip, true))
                {
                    playerid = i;
                    break;
                }
            }
        }
        if(playerid != -1)
        {
            new name[MAX_PLAYER_NAME];
            GetPlayerName(playerid, name, sizeof(name));
            if(strcmp(name, "EnterYourNameHere", true) != 0)
            {
                Ban(playerid);
            }
        }
    }
    return 1;
}
this will only ban the player, if he entered the correct player.

So short: This will automatically ban any player who does not have the name you enter in the "EnterYourNameHere" field.. Straight away, no warning, no question - just ban.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)