SA-MP Forums Archive
Disable / Ban all RCON use - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Disable / Ban all RCON use (/showthread.php?tid=311621)



Disable / Ban all RCON use - Gang65 - 17.01.2012

Hey,

I was wondering if there's any script that would allow me to ban all RCON usage on my server. I've disabled RCON on my server but there are hackers who still manage to get into it (I don't know how, I changed passwords several times before and even disabled it) and kick / ban players from the server and also type up random messages through /rcon say .

Hope there's a solution to this,

Thank you.


Re: Disable / Ban all RCON use - Snowman12 - 17.01.2012

try using OnRconLoginAttempt then set a timer with your GM do:

pawn Код:
// Timer Callback.
new NewPass = random(999999);
new string[128];
format(string,sizeof(string),"rcon_password %s",NewPass);
SendRconCommand(string);
return 1;
}



Re: Disable / Ban all RCON use - Konstantinos - 17.01.2012

pawn Код:
public OnRconLoginAttempt(ip[ ], password[ ], success)
{
    if(success) {
        new
            Ip[ 16 ];
           
        for(new i = 0; i <MAX_PLAYERS; i ++) {
            GetPlayerIp(i, Ip, sizeof(Ip));
            if(!strcmp(ip, Ip,true)) {
                new
                    Name[ MAX_PLAYER_NAME ];
                   
                GetPlayerName(i, Name, sizeof(Name));
                if(strcmp(Name, "Gang65", false)) BanEx(i, "You are not the Owner!");
            }
        }
        return 1;
    }
    return 1;
}