04.11.2014, 10:40
(
Последний раз редактировалось AmirRFCNR; 04.11.2014 в 11:21.
)
Detect Who Attempted Login Your Rcon 2 Times
Hey, This is a little tutorial to show you how to detect if someone attempted to login with your rcon with deception him, give him a wrong password, if he write it he will get banned.Part: #1
So we start put this under public OnRconLoginAttempt(ip[], password[], success) add this: if the player write a random wrong password, he will recive this MSG: you forget the password? the password is: (for example: change)
pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
{
if(!success)
{
printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
GameTextForPlayer(i,"~y~Welcome administrator ~n~~g~REMINDER: ~y~Our rcon password is change", 4000,5);
SendClientMessage(i, 0xFFFFFFFF, "you forget the password? the password is: change");
}
Sure he will try with the password required (change)
So if he write it he will get banned
pawn Код:
if(!strcmp(password, "change", true)) //if he tried with the password "change"
{
GameTextForPlayer(i,"~r~noob! ~n~~w~you attempt rcon password ~n~~r~bye", 4000,5);
SendClientMessage(i, 0xFFFFFFFF, "Idiot!");
Ban(i); //or Kick(i)
}
All Script
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(!success)
{
printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
GameTextForPlayer(i,"~y~Welcome administrator ~n~~g~REMINDER: ~y~Our rcon password is change", 4000,5);
SendClientMessage(i, 0xFFFFFFFF, "you forget the password? the password is: change");
}
if(!strcmp(password, "change", true))
{
GameTextForPlayer(i,"~r~noob! ~n~~w~you attempt rcon password ~n~~r~bye", 4000,5);
SendClientMessage(i, 0xFFFFFFFF, "noob!");
Ban(i);
}
}
return 1;
}