Advertisement
iXdoctor

NEW LOG CONSOLE VERISON

Jan 4th, 2015
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.22 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include amxmodx
  4. #include amxmisc
  5.  
  6. #define REQ_ACCESS  ADMIN_CHAT
  7. #define PROTECT_ACCESS  ADMIN_IMMUNITY
  8. #define PROTECT_STEAMIDS 1 // 1 == On, 0 == Off //
  9.  
  10. new const g_iProtectedSteamIDs [ ] [ ] =
  11. {
  12.     "STEAM_ID_LAN",
  13.     "VALVE_ID_LAN"
  14. }
  15.  
  16. public plugin_init()            register_plugin( "Players Log Info", "1.0", "xDoctor" );
  17.  
  18. public client_connect( index )      ConsoleInfo( index, 1 );
  19. public client_disconnect( index )   ConsoleInfo( index, 0 );
  20.  
  21. ConsoleInfo( const Player, const DidWhat )
  22. {
  23.     new g_iTargetIp[ 33 ], g_iName[ 33 ], g_iSteamID[ 33 ];
  24.  
  25.     get_user_name( Player, g_iName, charsmax( g_iName ) );
  26.     get_user_authid( Player, g_iSteamID, charsmax( g_iSteamID ) );
  27.     get_user_ip( Player, g_iTargetIp, charsmax( g_iTargetIp ) );
  28.    
  29.     for( new i; i < get_maxplayers(); i++ )
  30.     {
  31.         if( get_user_flags( Player ) & PROTECT_ACCESS && PROTECT_ACCESS != ADMIN_ALL )
  32.             continue;
  33.        
  34.         if( equali( g_iSteamID, g_iProtectedSteamIDs[ i ] ) && PROTECT_STEAMIDS == 1 )
  35.             continue;
  36.            
  37.         if( get_user_flags( i ) & REQ_ACCESS && is_user_connected( i )  )
  38.             client_print( i, print_console, "%s %s. SteamID: %s, IP: %s", g_iName, DidWhat == 1 ? "Connected" : "Disconnected", g_iSteamID, g_iTargetIp );
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement