SA-MP Forums Archive
RCON Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: RCON Problem (/showthread.php?tid=561586)



RCON Problem - Ghost110 - 03.02.2015

Hello guys. I have a problem here. When someone tries to login with the rcon pw, it should say:
Код:
AdmLogin: %s has failed login into RCON. Password used: %s. IP: %s
But when they use the wrong pw, they cant use the rcon cmds but it shows like this:
Код:
AdmLogin: %s has successfully logged into RCON. IP: %s.
I dont know what is wrong here

Код:
public OnRconLoginAttempt(ip[], password[], success)
{
	new pip[16], string[128];
	foreach(Player, i)
	{
		GetPlayerIp(i, pip, sizeof(pip));
		if(!strcmp(ip, pip, false))
		{
			if(!success) format(STRING, "AdmLogin: %s has failed login into RCON. Password used: %s. IP: %s.", GetPlayerNameEx(i), password);
			if(PlayerInfo[i][pAdmin] <= 4 && !success) { Kick(i); }
			else format(STRING, "AdmLogin: %s has successfully logged into RCON. IP: %s.", GetPlayerNameEx(i));
			ABroadCast(COLOR_ADMIN, string, 4);
			if(!success) format(STRING, "AdmLogin: %s has failed login into RCON. Password used: %s. IP: %s", GetPlayerNameEx(i), password, ip);
			else format(STRING, "AdmLogin: %s has successfully logged into RCON. IP: %s", GetPlayerNameEx(i), ip);
			Log("logs/rcon.log", string);
		}
	}
	return 1;
}



Re: RCON Problem - Ghost110 - 04.02.2015

Anyone?