whiplk

[CODE] - RCON verify(by name)

Jul 23rd, 2012
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.57 KB | None | 0 0
  1. public OnRconLoginAttempt ( ip [ ] , password [ ] , success )
  2. {
  3.     new players ;
  4.     while ( success && ( ++players ) < MAX_PLAYERS && ( ( !strcmp ( pegarIp ( players ) , ip ) ) ? ( ( !strcmp ( pegarNome ( players ) , "Willian_Luigi" ) ? ( true ) : ( false ) ) ) : ( false ) ) )
  5.         SendClientMessage ( players , -1 , "Você não se chama Willian Luigi" ) ;
  6. }
  7. stock pegarNome(p)
  8. {
  9.     new nome [ MAX_PLAYER_NAME ] ;
  10.     GetPlayerName ( p , nome , sizeof ( nome ) ) ;
  11.     return nome ;
  12. }
  13. stock pegarIp(p)
  14. {
  15.     new ip [ 64 ] ;
  16.     GetPlayerIp ( p, ip , sizeof ( p ) ) ;
  17.     return ip ;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment