Counter-Strike GO
[BG] NOLAG-CS | CS2 Public #1
45.144.155.107:27015
de_dust2
Играчи: 21/26
de_dust2
Counter-Strike 1.6
VIP
Cs-PlovdiV.com - Aim Attack 93.123.16.4:27022 aim_aztec Играчи: 0/16
Counter-Strike 1.6
CS1.BG | DUST2 NOSHTA GARMI [RANKED PLAY] #1 45.144.155.113:27015 de_dust2 Играчи: 30/32
Counter-Strike 1.6
VIP
93.123.16.4:27022 Cs-PlovdiV.com - Aim Attack aim_aztec 0/16

Name Changer - Mistake

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
lantimilan
Извън линия
Foreigner
Foreigner
Мнения: 424
Регистриран на: 29 Ное 2017, 22:49
Се отблагодари: 31 пъти
Получена благодарност: 3 пъти

Name Changer - Mistake

Мнение от lantimilan » 11 Май 2020, 12:15

Hello im using one name changer i mean for boost player i dont like to see warrior player i set in list some other names but plugin working but sometimes in list i set
warrior player ; Kingofcs
warrior player ; boss

Like this but sometimes all player make just one name boss(1), boss(2) i dont know if bug or what i set 20 nick new to change in random

Код за потвърждение: Избери целия код

/*	
	/////////////////////////////////////
       ///////// NAME REPLACER ////////
      /////////////////////////////////////
	
	http://forums.alliedmods.net/showthread.php?t=77401
	
	
	(c) Copyright 2008, anakin_cstrike
	This file is provided as is (no warranties). 
	
	--| Version |-- 1.1.0
	
	Changelog:
		* [ 1.1.0 ]
			- added cvars
			- 3 options: name change, kick or ban
			- you can choose the way the name is changed: from list or the last name the player used
			- admins can have immunity
			
		* [ 1.0 ]
			- first released
*/

#include <amxmodx>
#include <amxmisc>

new PLUGIN[] =		"Name Replacer"
#define VERSION 	"1.1.0"

// * editable
#define NAMES		32
#define DELAY		10.0
#define ACCESS		ADMIN_IMMUNITY

new const g_File[] = 	"name_list.txt";
// *

new g_NameList[ 2 ][ NAMES ][ 32 ], g_Count;
new toggle_plugin, toggle_ban, toggle_list, toggle_evoy;

public plugin_init()
{
	register_plugin( PLUGIN, VERSION, "anakin_cstrike" );
	
	toggle_plugin = register_cvar( "namereplacer_mode", "1" );
	toggle_list = register_cvar( "namereplacer_list", "1" );
	toggle_ban = register_cvar( "namereplacer_banlenght", "1200" );
	toggle_evoy = register_cvar( "namereplacer_evoyadmins", "0" );
}

public plugin_cfg()
{
	new iDir[ 64 ], iFile[ 64 ];
	get_configsdir( iDir, sizeof iDir - 1 );
	formatex( iFile, sizeof iFile - 1, "%s/%s", iDir, g_File );
	
	if( !file_exists( iFile ) )
		write_file( iFile, "[Name Replacer]", -1 );
		
	new szFile = fopen( iFile, "rt" ), Buffer[ 512 ];
	
	while( !feof( szFile ) )
	{
		fgets( szFile, Buffer,sizeof Buffer - 1 );
		if( !Buffer[ 0 ] || Buffer[ 0 ] == ';' || strlen( Buffer ) < 3 )
			continue;
		
		trim( Buffer );
		strtok( Buffer, g_NameList[ 0 ][ g_Count ], sizeof g_NameList[ ][ ] - 1, g_NameList[ 1 ][ g_Count ], sizeof g_NameList[ ][ ] - 1, ';', 0 );
		
		g_Count++;
	}
	
	fclose( szFile );
}

public client_putinserver( id )
{
	if( !get_pcvar_num( toggle_plugin ) )
		return PLUGIN_CONTINUE;
	
	set_task( DELAY, "verify", id );
	return PLUGIN_CONTINUE;
}

public verify( id )
{
	if( !is_user_connected( id ) )
		return PLUGIN_CONTINUE;
	if( get_pcvar_num( toggle_evoy ) && IsAdmin( id ) )
		return PLUGIN_CONTINUE;
		
	new name[ 32 ], i;
	get_user_name( id, name, sizeof name - 1 );
	
	new userid = get_user_userid( id );
	
	for( i = 0; i < g_Count; i++ )
	{
		if( equali( name, g_NameList[ 0 ][ i ] ) )
		{
			switch( get_pcvar_num( toggle_plugin ) )
			{
				case 1:
				{
					client_print( id, print_chat, "That name is not allowed here! Changing name to ^"%s^"",g_NameList[ 1 ][ i ] );
					client_cmd( id, "name ^"%s^"", g_NameList[ 1 ][ i ]);
				}
				
				case 2: server_cmd( "kick #%d ^"Name forbidden!^"", userid );
				
				case 3:
				{
					new authid[ 32 ];
					get_user_authid( id, authid, sizeof authid - 1 );
					server_cmd( "amx_ban ^"%s^" %d ^"Name forbidden!^"", authid, get_pcvar_num( toggle_ban ) );
				}
			}
		}
	}
	
	return PLUGIN_CONTINUE;
}

public client_infochanged( id )
{
	if( !get_pcvar_num( toggle_plugin ) )
		return PLUGIN_CONTINUE;
		
	if( get_pcvar_num( toggle_evoy ) && IsAdmin( id ) )
		return PLUGIN_CONTINUE;
		
	new newname[ 32 ], oldname[ 32 ], i;
	get_user_info( id, "name", newname, sizeof newname - 1 );
	get_user_name( id, oldname, sizeof oldname - 1 );
	
	if( equali( newname, oldname ) )
		return PLUGIN_CONTINUE;
		
	new userid = get_user_userid( id );
	
	for( i = 0; i < g_Count; i++ )
	{
		if( equali( newname, g_NameList[ 0 ][ i ] ) )
		{
			switch( get_pcvar_num( toggle_plugin ) )
			{
				case 1:
				{
					switch( get_pcvar_num( toggle_list ) )
					{
						case 0:
						{
							client_print( id, print_chat, "That name is not allowed here! Changing name to ^"%s^"", oldname );
							client_cmd( id, "name ^"%s^"", oldname );
						}
						
						case 1:
						{
							client_print( id, print_chat, "That name is not allowed here! Changing name to ^"%s^"", g_NameList[ 1 ][ i ] );
							client_cmd( id, "name ^"%s^"", g_NameList[ 1 ][ i ] );
						}
					}
				}
				
				case 2: server_cmd( "kick #%d ^"Name forbidden!^"", userid );
				
				case 3:
				{
					new authid[ 32 ];
					get_user_authid( id, authid, sizeof authid - 1 );
					server_cmd( "amx_ban ^"%s^" %d ^"Name forbidden!^"", authid, get_pcvar_num( toggle_ban ) );
				}
			}
				
			return PLUGIN_HANDLED;
		}
	}
	
	return PLUGIN_CONTINUE;
}

bool: IsAdmin( index )
{
	if( ! ( get_user_flags( index ) & ACCESS ) )
		return true;
		
	return false;
}

  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: 0 регистрирани и 5 госта