Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include < amxmodx >
- new szIP[ 33 ][ 22 ], g_iMaxPlayers;
- public plugin_init()
- {
- register_plugin( "Block 2 IPs", "v1.0", "+ColdWar" );
- g_iMaxPlayers = get_maxplayers( );
- }
- public client_putinserver( client )
- {
- get_user_ip( client, szIP[ client ], sizeof szIP[] - 1, 1 );
- for( new i = 1 ; i <= g_iMaxPlayers( ) ; i ++ )
- {
- if( !is_user_connected( i ) )
- continue;
- if( !equal( szIP[ client ], szIP[ i ] ) )
- continue;
- cause_disconnect( client );
- break;
- }
- }
- stock cause_disconnect( client )
- {
- message_begin( MSG_ONE_UNRELIABLE, SVC_DISCONNECT, .player = client );
- ewrite_string( "Another computer is connected with the same IP address to this server." );
- message_end( );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement