Problem OnRconLoginAttempt - 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: Problem OnRconLoginAttempt (
/showthread.php?tid=332615)
Problem OnRconLoginAttempt -
NaTkAkN - 08.04.2012
Hello guys, I wanted to ask how do I create an anti rcon login.
Basically, I want to make sure that only those who can log rcon ip 192.168.1.2, otherwise, if a rcon logs correctly, but it has the ip 192.168.1.2 is autobanned. Help me please D:
Re: Problem OnRconLoginAttempt -
[MG]Dimi - 08.04.2012
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
if(success && strcmp(ip,"192.168.1.2",true))
{
new IP[20];
for(new i=0;i<MAX_PLAYERS;i++)
{
GetPlayerIp(i,IP,20);
if(strcmp(IP,ip,true))
{
BanEx(i, "Breaking RCON Password");
break;
}
}
}
return 1;
}
Should work.