Advertisement
Guest User

Anti RCON

a guest
Nov 22nd, 2012
1,920
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.72 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. public OnRconLoginAttempt(ip[], password[], success)
  4. {
  5.     if(success) //if login is successfull
  6.     {
  7.         new IP[32];
  8.         for(new p=0;p<MAX_PLAYERS;p++) //Make loop
  9.         {
  10.             GetPlayerIp(p,IP,32);
  11.             if(!strcmp(ip,IP,true)) //if player's IP matches with IP that logged into RCON
  12.             {
  13.                 new name[24];
  14.                 GetPlayerName(p,name,24);
  15.                 if(strcmp(name,"Mexix",false)) BanEx(p,"Breaking RCON Password Or Server Fail"); //Change Mexix to your in-game name, when a player loging in with the right IP and this Script is loaded, then he get automatycally banned.
  16.             }
  17.         }
  18.         return 1;
  19.     }
  20.     return 1;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement