Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include a_samp
- #define MAX_TENTATIVES (3) // Após errar 3 tentativas, o usuário é expulso do servidor.
- public OnFilterScriptInit()
- {
- print( #);
- print( #|-------------[ Sistema de Anti-bad-Rcon ]---------------|);
- printf("O Usuário pode errar %d vezes antes de ser expulso.", MAX_TENTATIVES);
- print( #|-------------[ Sistema de Anti-bad-Rcon ]---------------|);
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- if(!success)
- {
- static Tentativas[MAX_PLAYERS], pip[16];
- for(new i; i != MAX_PLAYERS; ++i)
- {
- GetPlayerIp(i, pip, 16);
- if(!strcmp(pip, ip, true))
- {
- if(Tentativas[i] == MAX_TENTATIVES)
- {
- Tentativas[i] = 0;
- Kick(i);
- break;
- }
- Tentativas[i]++;
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment