Kick Rcon
#1

How to kick someone if they login as a rcon
Reply
#2

what do you mean? i don't understand. either kick him like normal or change your rcon password?
Reply
#3

English is one heck of a thing to you, let me break it down for the stupid

When the Rcon Admins Logins in KICKED THEM
Reply
#4

pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
    if(success) //If the password was correct
    {
        new pip[16];
        for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players
        {
            GetPlayerIp(i, pip, sizeof(pip));
            if(!strcmp(ip, pip, true)) //If a player's IP is the IP that succeed the login
            {
                SendClientMessage(i, 0xFFFFFFFF, "You logged in. Bye!"); //Send a message
                Kick(i); //They are now kicked.
            }
        }
    }
    return 1;
}
https://sampwiki.blast.hk/wiki/OnRconLoginAttempt
Reply
#5

pawn Код:
Kick(i);
Wouldnt it everyone
Reply
#6

No, as the loop is broken.

This does not stop people logging on with rcon console, so adding "rcon 0" to your server config would be much better.
Reply
#7

Quote:
Originally Posted by Glad2BeHere
Посмотреть сообщение
pawn Код:
Kick(i);
Wouldnt it everyone
Did you check the whole code?

pawn Код:
if(!strcmp(ip, pip, true)) //If a player's IP is the IP that succeed the login
Reply
#8

in my cfg and can do rcon 0?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)