Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- enum PlayerInfo
- {
- Banned,
- BadRcon
- }
- new pInfo[MAX_PLAYERS][PlayerInfo];
- public OnRconLoginAttempt(ip[], password[], success)
- {
- if(!success)
- {
- printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
- new pip[16];
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- GetPlayerIp(i, pip, sizeof(pip));
- if(!strcmp(ip, pip, true))
- {
- pInfo[i][BadRcon]++;
- {
- if(pInfo[i][BadRcon]==1)
- {
- pInfo[i][Banned]=1;
- Kick(i);
- }
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment