27.04.2017, 17:26
Quote:
Best failsafe for me:
server.cfg Код:
rcon 0 rcon_password TAzADG3q6AH0UW0HPkfHi0YwSfhE7WsJ pawn Код:
|
but I'm wondering if I can completely disable that Rcon login.
(you get kicked if you type whether correct or incorrect password) But thx anyway :P
I did something hopefully it's ok(below at else if)
Код:
public OnRconLoginAttempt(ip[], password[], success) { if(!success) { new pip[16],string[256],name[25]; foreach(Player, i) { GetPlayerIp(i, pip, sizeof(pip)); if(!strcmp(ip, pip, true)) { GetPlayerName(i, name, sizeof(name)); format(string,sizeof(string),"Notice: {FFFFFF}%s has entered a wrong rcon password (IP: %s).",name,ip); ABroadCast(COLOR_RED2,string,3); Kick(i); return 1; } } } else if(success) { new pip[16],string[256],name[25]; foreach(Player, i) { GetPlayerIp(i, pip, sizeof(pip)); if(!strcmp(ip, pip, true)) { GetPlayerName(i, name, sizeof(name)); Kick(i); // kicks the player, even if it's correct pass. return 1; } } } return 1; }
![Cheesy](images/smilies/biggrin.png)