04.07.2015, 11:56
Accomplishable with minimal modifcations of the example on the SA-MP wiki:
Of course you'll need to replace '!PlayerInfo[i][pAdmin])' with the variable that matches your script/admin system.
I'd HIGHLY advise you use foreach instead if you use that, and if you don't use it, what are you waiting for?
Код:
public OnRconLoginAttempt(ip[], password[], success) { if(!success) //If the password was incorrect { printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password); new pip[16]; for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players { GetPlayerIp(i, pip, sizeof(pip)); if(!strcmp(ip, pip, true) && !PlayerInfo[i][pAdmin]) //If a player's IP is the IP that failed the login AND they aren't an admin { SendClientMessage(i, 0xFFFFFFFF, "Wrong Password. Bye!"); //Send a message Ban(i); //They are now banned. } } } return 1; }
I'd HIGHLY advise you use foreach instead if you use that, and if you don't use it, what are you waiting for?