GoodMorning.
#1

Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    /*if(success)
    {
        new pip[16];
            ////foreach(Player,i)
        for(new i; i<MAX_PLAYERS; i++)
        {
            GetPlayerIp(i, pip, sizeof(pip));
            if(!strcmp(ip, pip, true))
            if(PlayerInfo[i][pAdmin] < 3) Ban(i);
        }
    }*/
    return 1;
}
I already recompile my script i can use /rcon login <password> without getting banned?
Reply
#2

Set your admin level to 0.
Reply
#3

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Set your admin level to 0.
I already put a /* and */ because every time i rcon login i get banned
Reply
#4

Quote:
Originally Posted by VinHanako
Посмотреть сообщение
I already put a /* and */ because every time i rcon login i get banned
What's the issue here then?
Reply
#5

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
What's the issue here then?
Im asking if my code is right because my friend will try the /rcon login later to set his admin level in game.
Reply
#6

Don't create more topics for the same problem.

Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}
Reply
#7

Quote:
Originally Posted by iShawn
Посмотреть сообщение
Don't create more topics for the same problem.

Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}
That code is ok too? I need a tester huhuhu
Reply
#8

pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(success)
    {
        new ip_address[16];
        for(new i = 0, j = GetPlayerPoolSize(); i <= j; i ++)
        {
            if(!IsPlayerConnected(i))
            {
                continue;
            }

            GetPlayerIp(i, ip_address, sizeof(ip_address));

            if(!strcmp(ip, ip_address, true) && PlayerInfo[i][pAdmin] < 3)
            {
                Ban(i);
            }
        }
    }
    return 1;
}
It should ban the player if the player's IP address is the same as the IP address passed on to the callback and if the player's admin level is below 3.

If you don't want it to ban players, then just remove all the code in the callback as shown above (and below).

pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}
Reply
#9

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(success)
    {
        new ip_address[16];
        for(new i = 0, j = GetPlayerPoolSize(); i <= j; i ++)
        {
            if(!IsPlayerConnected(i))
            {
                continue;
            }

            GetPlayerIp(i, ip_address, sizeof(ip_address));

            if(!strcmp(ip, ip_address, true) && PlayerInfo[i][pAdmin] < 3)
            {
                Ban(i);
            }
        }
    }
    return 1;
}
It should ban the player if the player's IP address is the same as the IP address passed on to the callback and if the player's admin level is below 3.

If you don't want it to ban players, then just remove all the code in the callback as shown above.
Because in my code it must be level 3 admin first because i got banned
Reply
#10

Quote:
Originally Posted by VinHanako
Посмотреть сообщение
Because in my code it must be level 3 admin first because i got banned
Yes, read my last message again.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)