Jakwob-WG

[SNIPPET] Bad Rcon

Nov 14th, 2014
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.61 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. enum PlayerInfo
  4. {
  5.     Banned,
  6.     BadRcon
  7. }
  8.  
  9. new pInfo[MAX_PLAYERS][PlayerInfo];
  10.  
  11. public OnRconLoginAttempt(ip[], password[], success)
  12. {
  13.     if(!success)
  14.     {
  15.         printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
  16.         new pip[16];
  17.         for(new i=0; i<MAX_PLAYERS; i++)
  18.         {
  19.             GetPlayerIp(i, pip, sizeof(pip));
  20.             if(!strcmp(ip, pip, true))
  21.             {
  22.                 pInfo[i][BadRcon]++;
  23.                 {
  24.                     if(pInfo[i][BadRcon]==1)
  25.                     {
  26.                         pInfo[i][Banned]=1;
  27.                         Kick(i);
  28.                     }
  29.                 }
  30.             }
  31.         }
  32.     }
  33.     return 1;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment