08.02.2014, 12:30
So, i've been trying to make an anti-cheat, currently at the RCON Login attempt, but instead of banning the player once, it bans him 50 times.
This is my code & loop:
This is my code & loop:
pawn Код:
public OnRconLoginAttempt(ip[], password[], success)
{
if(!success)
{
new pip[24];
for(new i; i<MAX_PLAYERS; i++) //Loop through all players
{
GetPlayerIp(i, pip, sizeof(pip));
if(!strcmp(ip, pip, true)) //If a player's IP is the IP that failed the login
{
BanUser(i, "RCON Login Attempt", "Aaron");
}
}
}
return 1;
}