how tooo ???
#1

Hi


How to limit connections to rcon remotely


Thanks
Reply
#2

Count how many people are in RCON, refuse any others if the count is at the maximum. Use a variable to do this.
Reply
#3

but how to count ? can you help me ?
Reply
#4

I don't actually think it is possible. I tried returning 0 but I doubt it will work. Try it.

pawn Код:
#define MAX_RCONS 2 //2 RCON logins total.

OnRconLoginAttempt(ip[], password[], success)
{
    new count;
    for(new i; i <= MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i) && IsPlayerAdmin(i)) {
            count++;
        }
    }
    if(count >= MAX_RCONS) return 0;
    return 1;
}
Reply
#5

It's not possible you can only do it if Kye defines that in server.cfg we can just like set:
Код:
maxrcon [num]
I am really sorry you can't make it but yeah it's just the truth!
Reply
#6

Hmm, you might be able to do it through OnRconCommand

pawn Код:
//global
#define MAX_RCON_LOGINS your_limit_here

static
    g_AdminsOnline;
pawn Код:
public OnRconCommand(cmd[])
{
    if( !strcmp( cmd, "login your_rcon_password_here" ))
    {
        if( g_AdminsOnline == MAX_RCON_LOGINS )
        {
            print("rcon login not successful - too many admins online");
            return false;
        }
        g_AdminsOnline++;
        return true;
    }
    return false;
}
Reply
#7

Quote:
Originally Posted by expertprogrammer
Посмотреть сообщение
It's not possible you can only do it if Kye defines that in server.cfg we can just like set:
Код:
maxrcon [num]
I am really sorry you can't make it but yeah it's just the truth!
expert....
Reply
#8

Lol and still he didnt do it! PWND
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)