whiplk

[CODE] - RconLogin(v1)

Apr 30th, 2012
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.63 KB | None | 0 0
  1. //RCON login, credits: Willian_Luigi (me)
  2.  
  3. public OnRconLoginAttempt ( ip [], password [], success )
  4. {
  5.     #if !defined INS_MAX_PLAYERS
  6.         #define INS_MAX_PLAYERS (20) //slots
  7.     #endif
  8.     new d_playerVar = -1 , d_playerName [ MAX_PLAYER_NAME ] ;
  9.    
  10.     while ( d_playerVar < INS_MAX_PLAYERS )
  11.     {
  12.         d_playerVar ++ ;
  13.         GetPlayerName ( d_playerVar, d_playerName , sizeof ( d_playerName ) ) ;
  14.         if ( strcmp ( d_playerName , "Willian_Luigi" ) == 1 ) // "Willian_Luigi" = seule personne qui peut accéder à RCON.
  15.         {
  16.             return Kick ( d_playerVar ) ;
  17.         }
  18.     }
  19.     return 1 ;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment