Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnRconLoginAttempt(ip[], password[], success)
- {
- if(!success)
- {
- printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
- for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players
- {
- new pip[16];
- GetPlayerIp(i, pip, sizeof(pip));
- if(!strcmp(ip, pip, true))
- {
- SetPVarInt(i, "RCONFail", GetPVarInt(i, "RCONFail")+1);
- if(GetPVarInt(i, "RCONFail") == 5)
- {
- SendClientMessage(i, 0xFF0000FF, "Wrong Password. Bye!");
- BanEx(i, "Failed to login as RCON");
- }
- else SendClientMessage(i, 0xFF0000FF, "Wrong RCON passord. Do not try to login as RCON if you aren't even permitted.");
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment