Discord sunucumuz açılmıştır, hepinizi bekleriz

https://discord.gg/43gGDQe6tS

kufur engelleme plugini sıkıntısı

Eklenti sorunlarınız ve özel eklenti istekleriniz

Moderatör: Moderatörler

Kullanıcı avatarı

Konu Sahibi
loneylwolfrd
Mesajlar: 46
Kayıt: Cmt Kas 25, 2017 3:14 pm
Server Ip/DNS: cs242.csduragi.com
Clan İsmi: Ready2Die ~
İletişim:

kufur engelleme plugini sıkıntısı

Mesaj gönderen loneylwolfrd »

Selamun Aleykum gencler bu kufur edeni uyarıp sonrada oto gaglayan plugin sıkıntı oluyor başkada yok
sıkıntısına gelecek olursa mesela ben mk m k gibi bosluklu yapmasınlarda diye bu şekilde yazıyorum bunu engellemesini istiyorum tmmknk yada tmm knk yazıyor oyuncu ve yine gaglanıyor buna bir cozum yokmu yada baska tavsiye edebileceginiz bir kufur engelleme plugini varmı oto gag cok güzeldi yanlız olmuyorsa başka pluginede razıyız artık yapacak birşey yok

kullandıgım plugin

Kod: Tümünü seç

#include <amxmodx>
#include <amxmisc> 

#define MAX_WORDS 150
#define MAX_REPLACE 50

new g_swearWords[MAX_WORDS][20]
new g_replaceLines[MAX_REPLACE][192]
new g_swearNum
new g_replaceNum

new g_sansursayisi[64]

new g_maxsansur
new g_sansur[64]
new bansuresi
new g_bansuresi[64]

public plugin_init()
{
	register_plugin ( "Kufur Reklam Engelleme", "1.5", "Csduragi.com-editleme redarmygaming")
	register_clcmd ( "say", "swearcheck" )
	register_clcmd ( "say_team", "swearcheck" )
	register_concmd ( "amx_addswear", "add_swear", ADMIN_LEVEL_A , "< sansurlenmesini istedigin kelimeyi yaz.. >" )
	register_concmd ( "amx_addreplacement", "add_replacement", ADMIN_LEVEL_A , "< sansur yazisini yaz.. >" )
	g_maxsansur = register_cvar("sv_kre_maxuyari","2") // maksimum uyari sayisi // 0 konulursa banlama olmayacaktır.
	get_pcvar_string(g_maxsansur,g_sansur,63)
	bansuresi = register_cvar("sv_kre_gagsuresi","300") // adam gaglama suresi
	get_pcvar_string(bansuresi,g_bansuresi,63)
	readList()
}

readList()
{
	new Configsdir[64]
	new swear_file[64], replace_file[64]
	get_configsdir( Configsdir, 63 )
	format(swear_file, 63, "%s/kufurler_reklamlar.ini", Configsdir )
	format(replace_file, 63, "%s/degistirmeler.ini", Configsdir )

	if ( !file_exists(swear_file) )
	{
		server_print ( "==========================================================" )
		server_print ( "[Kufur ve Reklam Engelleme] %s dosyasi bulunamadi", swear_file )
		server_print ( "==========================================================" )
		return
	}
	
	if ( !file_exists(replace_file) )
	{
		server_print ( "==========================================================" )
		server_print ( "[Ready2DieGaming] %s dosyasi bulunamadi", replace_file )
		server_print ( "==========================================================" )
		return
	}
	
	new len, i=0
	while( i < MAX_WORDS && read_file( swear_file, i , g_swearWords[g_swearNum], 19, len ) )
	{
		i++
		if( g_swearWords[g_swearNum][0] == ';' || len == 0 )
			continue
		g_swearNum++
	}

	i=0
	while( i < MAX_REPLACE && read_file( replace_file, i , g_replaceLines[g_replaceNum], 191, len ) )
	{
		i++
		if( g_replaceLines[g_replaceNum][0] == ';' || len == 0 )
			continue
		g_replaceNum++
	}

	server_print ( "======================================================" )
	server_print ( "[Ready2Die Gaming]  %d Yasakli Kelimeler Yuklendi", g_swearNum )
	server_print ( "[Ready2Die Gaming]  %d Yedek Hatlar Yuklendi", g_replaceNum )
	server_print ( "======================================================" )

}

public client_connect(id)
{
	new new_name[32]
	get_user_name ( id, new_name, 31 )

	string_cleaner ( new_name )
	g_sansursayisi[id] = get_pcvar_num(g_maxsansur)
	new i = 0
	while ( i < g_swearNum )
	{
		if ( containi ( new_name, g_swearWords[i++] ) != -1 )
		{
			

			return PLUGIN_CONTINUE
		}
	}
	
	return PLUGIN_CONTINUE
}
	

public swearcheck(id)
{
	/*if ( (get_user_flags(id)&ADMIN_LEVEL_A) || !id )
		return PLUGIN_CONTINUE
	*/
	new said[192]
	read_args ( said, 191 )

	string_cleaner ( said )

	new i = 0
	while ( i < g_swearNum )
	{
		if ( containi ( said, g_swearWords[i++] ) != -1 )
		{
			new j, playercount, players[32], user_name[32], random_replace = random ( g_replaceNum )
			get_user_name ( id, user_name, 31 )
			get_players ( players, playercount, "c" )

			for ( j = 0 ; j < playercount ; j++)
			{
				if ( get_user_flags(players[j])&ADMIN_LEVEL_A )
					ChatColor(players[j],"^3[ ^4Ready2Die Gaming ^3 ] ^3 : %s^1 :^4 %s",user_name,said)
			
					
				
					
					
					
			}
				
			if(get_pcvar_num(g_maxsansur) == 0){
				return PLUGIN_HANDLED	
						
			}
			if(g_sansursayisi[id] == 0){
					
				ChatColor(0,"^3[ ^4Ready2Die Gaming^3] ^3 %s Uyari Sayin^4 %s^3 'i gectigi icin^4 %s^3 Dakika gaglanacaksiniz..",user_name,g_sansur,g_bansuresi)	
				server_cmd("amx_gag #%d 300 abc ^"COK SAYIDA YASAKLI KELIME KULLANDIGINIZ ICIN GAGLANDINIZ.^"",get_user_userid(id));
				return PLUGIN_HANDLED
			}
			else
			{
				g_sansursayisi[id] -= 1	

				ChatColor(id,"^1[ ^4Ready2Die Gaming ^1] ^3 : Kullandigin Kelimelere Lutfen ^4 Dikkat Et ^3 Aksi Taktirde Sunucudan Otomatik ^4 [GAG] yiceksiniz.^3.!")
				ChatColor(id,"^1[ ^4Ready2Die Gaming ^1] ^3 : Kalan Tekrarlama Hakkin :^4 %d ",g_sansursayisi[id])
				ChatColor(id,"^1[ ^4Ready2Die Gaming ^1] ^3 : Sinir Tekrarlama Sayisini Gecersen ^4%s ^3Dakika gaglanacaksiniz..!",g_bansuresi)
				return PLUGIN_HANDLED
						
			}		
			copy ( said, 191, g_replaceLines[random_replace] )
			new cmd[10]
			read_argv ( 0, cmd, 9)
			engclient_cmd ( id ,cmd ,said )

			return PLUGIN_HANDLED
		}
	}
	return PLUGIN_CONTINUE
}

public add_swear(id)
{
	if ( ( !(get_user_flags(id)&ADMIN_LEVEL_A) && id ) )
	{
		client_print ( id, print_console, "[Ready2Die Gaming] Erisim Engellendi" )
	 	return PLUGIN_HANDLED
	}

	if ( read_argc() == 1 )
	{
		client_print ( id, print_console, "[Ready2Die Gaming] Kanit Saglanmaz" )
	 	return PLUGIN_HANDLED
	}

	new Configsdir[64]
	new swear_file[64]
	get_configsdir( Configsdir, 63 )
	format ( swear_file, 63, "%s/kufurler_reklamlar.ini", Configsdir )

	read_args ( g_swearWords[g_swearNum], 19 )
	write_file( swear_file, "" )
	write_file( swear_file, g_swearWords[g_swearNum] )
	g_swearNum++

	id ? client_print ( id, print_console, "[Ready2Die Gaming] Yasakli Kelime Listesine Eklendi" ) : server_print ( "[K.R.E] Kelime Dosyaya Eklendi" )

	return PLUGIN_HANDLED
}

public add_replacement(id)
{
	if ( ( !(get_user_flags(id)&ADMIN_LEVEL_A) && id ) )
	{
		client_print ( id, print_console, "[Ready2Die Gaming] Erisim Engellendi" )
	 	return PLUGIN_HANDLED
	}

	if ( read_argc() == 1 )
	{
		client_print ( id, print_console, "[Ready2Die Gaming] Kanit Saglanmaz" )
	 	return PLUGIN_HANDLED
	}

	new Configsdir[64]
	new replace_file[64]
	get_configsdir( Configsdir, 63 )
	format ( replace_file, 63, "%s/degistirmeler.ini", Configsdir )

	read_args ( g_replaceLines[g_replaceNum], 191 )
	write_file( replace_file, "" )
	write_file( replace_file, g_replaceLines[g_replaceNum] )
	g_replaceNum++

	id ? client_print ( id, print_console, "[Ready2Die Gaming] Yedek Hat Listesine Eklendi" ) : server_print ( "[Kufur ve Reklam Engelleme] Yedek Hat Dosyasina Eklendi" )

	return PLUGIN_HANDLED
}

public string_cleaner( str[] )
{
	new i, len = strlen ( str )
	while ( contain ( str, " " ) != -1 )
		replace ( str, len, " ", "" )

	len = strlen ( str )
	while ( contain ( str, "|<" ) != -1 )
		replace ( str, len, "|<", "k" )

	len = strlen ( str )
	while ( contain ( str, "|>" ) != -1 )
		replace ( str, len, "|>", "p" )

	len = strlen ( str )
	while ( contain ( str, "()" ) != -1 )
		replace ( str, len, "()", "o" )

	len = strlen ( str )
	while ( contain ( str, "[]" ) != -1 )
		replace ( str, len, "[]", "o" )

	len = strlen ( str )
	while ( contain ( str, "{}" ) != -1 )
		replace ( str, len, "{}", "o" )

	len = strlen ( str )
	for ( i = 0 ; i < len ; i++ )
	{
		if ( str[i] == '@' )
			str[i] = 'a'

		if ( str[i] == '$' )
			str[i] = 's'

		if ( str[i] == '0' )
			str[i] = 'o'

		if ( str[i] == '7' )
			str[i] = 't'

		if ( str[i] == '3' )
			str[i] = 'e'

		if ( str[i] == '5' )
			str[i] = 's'

		if ( str[i] == '<' )
			str[i] = 'c'

		if ( str[i] == '3' )
			str[i] = 'e'

	}
}


stock ChatColor(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4")
	replace_all(msg, 190, "!y", "^3")
	replace_all(msg, 190, "!team", "^1")
	
	if (id) players[0] = id; else get_players(players, count, "ch")
	{
		for (new i = 0; i < count; i++)
		{
			if (is_user_connected(players[i]))
			{
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
				write_byte(players[i]);
				write_string(msg); 
				message_end();
			}
		}
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/

Link:
Linklerini gizle
Linki Kopyala
Kullanıcı avatarı

Taha Demirbaş
Mesajlar: 10423
Kayıt: Cum Tem 08, 2016 10:05 pm
Konum: Türkiye
İletişim:

kufur engelleme plugini sıkıntısı

Mesaj gönderen Taha Demirbaş »

Bir denermisin gerçi hata verirmi olurmu denemedim ?

Kod: Tümünü seç

#include <amxmodx>
#include <amxmisc> 

#define MAX_WORDS 150
#define MAX_REPLACE 50

new g_swearWords[MAX_WORDS][20]
new g_replaceLines[MAX_REPLACE][192]
new g_swearNum
new g_replaceNum

new g_sansursayisi[64]

new g_maxsansur
new g_sansur[64]
new bansuresi
new g_bansuresi[64]

public plugin_init()
{
   register_plugin ( "Kufur Reklam Engelleme", "1.5", "Csduragi.com-editleme redarmygaming")
   register_clcmd ( "say", "swearcheck" )
   register_clcmd ( "say_team", "swearcheck" )
   register_concmd ( "amx_addswear", "add_swear", ADMIN_LEVEL_A , "< sansurlenmesini istedigin kelimeyi yaz.. >" )
   register_concmd ( "amx_addreplacement", "add_replacement", ADMIN_LEVEL_A , "< sansur yazisini yaz.. >" )
   g_maxsansur = register_cvar("sv_kre_maxuyari","2") // maksimum uyari sayisi // 0 konulursa banlama olmayacaktır.
   get_pcvar_string(g_maxsansur,g_sansur,63)
   bansuresi = register_cvar("sv_kre_gagsuresi","300") // adam gaglama suresi
   get_pcvar_string(bansuresi,g_bansuresi,63)
   readList()
}

readList()
{
   new Configsdir[64]
   new swear_file[64], replace_file[64]
   get_configsdir( Configsdir, 63 )
   format(swear_file, 63, "%s/kufurler_reklamlar.ini", Configsdir )
   format(replace_file, 63, "%s/degistirmeler.ini", Configsdir )

   if ( !file_exists(swear_file) )
   {
      server_print ( "==========================================================" )
      server_print ( "[Kufur ve Reklam Engelleme] %s dosyasi bulunamadi", swear_file )
      server_print ( "==========================================================" )
      return
   }
   
   if ( !file_exists(replace_file) )
   {
      server_print ( "==========================================================" )
      server_print ( "[Ready2DieGaming] %s dosyasi bulunamadi", replace_file )
      server_print ( "==========================================================" )
      return
   }
   
   new len, i=0
   while( i < MAX_WORDS && read_file( swear_file, i , g_swearWords[g_swearNum], 19, len ) )
   {
      i++
      if( g_swearWords[g_swearNum][0] == ';' || len == 0 )
         continue
      g_swearNum++
   }

   i=0
   while( i < MAX_REPLACE && read_file( replace_file, i , g_replaceLines[g_replaceNum], 191, len ) )
   {
      i++
      if( g_replaceLines[g_replaceNum][0] == ';' || len == 0 )
         continue
      g_replaceNum++
   }

   server_print ( "======================================================" )
   server_print ( "[Ready2Die Gaming]  %d Yasakli Kelimeler Yuklendi", g_swearNum )
   server_print ( "[Ready2Die Gaming]  %d Yedek Hatlar Yuklendi", g_replaceNum )
   server_print ( "======================================================" )

}

public client_connect(id)
{
   new new_name[32]
   get_user_name ( id, new_name, 31 )

   string_cleaner ( new_name )
   g_sansursayisi[id] = get_pcvar_num(g_maxsansur)
   new i = 0
   while ( i < g_swearNum )
   {
      if ( containi ( new_name, g_swearWords[i++] ) != -1 )
      {
         

         return PLUGIN_CONTINUE
      }
   }
   
   return PLUGIN_CONTINUE
}
   

public swearcheck(id)
{
   /*if ( (get_user_flags(id)&ADMIN_LEVEL_A) || !id )
      return PLUGIN_CONTINUE
   */
   new said[192]
   read_args ( said, 191 )

   string_cleaner ( said )

   new i = 0
   while ( i < g_swearNum )
   {
      if (equali( said, g_swearWords[i++] ) != -1 )
      {
         new j, playercount, players[32], user_name[32], random_replace = random ( g_replaceNum )
         get_user_name ( id, user_name, 31 )
         get_players ( players, playercount, "c" )

         for ( j = 0 ; j < playercount ; j++)
         {
            if ( get_user_flags(players[j])&ADMIN_LEVEL_A )
               ChatColor(players[j],"^3[ ^4Ready2Die Gaming ^3 ] ^3 : %s^1 :^4 %s",user_name,said)
         
               
            
               
               
               
         }
            
         if(get_pcvar_num(g_maxsansur) == 0){
            return PLUGIN_HANDLED   
                  
         }
         if(g_sansursayisi[id] == 0){
               
            ChatColor(0,"^3[ ^4Ready2Die Gaming^3] ^3 %s Uyari Sayin^4 %s^3 'i gectigi icin^4 %s^3 Dakika gaglanacaksiniz..",user_name,g_sansur,g_bansuresi)   
            server_cmd("amx_gag #%d 300 abc ^"COK SAYIDA YASAKLI KELIME KULLANDIGINIZ ICIN GAGLANDINIZ.^"",get_user_userid(id));
            return PLUGIN_HANDLED
         }
         else
         {
            g_sansursayisi[id] -= 1   

            ChatColor(id,"^1[ ^4Ready2Die Gaming ^1] ^3 : Kullandigin Kelimelere Lutfen ^4 Dikkat Et ^3 Aksi Taktirde Sunucudan Otomatik ^4 [GAG] yiceksiniz.^3.!")
            ChatColor(id,"^1[ ^4Ready2Die Gaming ^1] ^3 : Kalan Tekrarlama Hakkin :^4 %d ",g_sansursayisi[id])
            ChatColor(id,"^1[ ^4Ready2Die Gaming ^1] ^3 : Sinir Tekrarlama Sayisini Gecersen ^4%s ^3Dakika gaglanacaksiniz..!",g_bansuresi)
            return PLUGIN_HANDLED
                  
         }      
         copy ( said, 191, g_replaceLines[random_replace] )
         new cmd[10]
         read_argv ( 0, cmd, 9)
         engclient_cmd ( id ,cmd ,said )

         return PLUGIN_HANDLED
      }
   }
   return PLUGIN_CONTINUE
}

public add_swear(id)
{
   if ( ( !(get_user_flags(id)&ADMIN_LEVEL_A) && id ) )
   {
      client_print ( id, print_console, "[Ready2Die Gaming] Erisim Engellendi" )
       return PLUGIN_HANDLED
   }

   if ( read_argc() == 1 )
   {
      client_print ( id, print_console, "[Ready2Die Gaming] Kanit Saglanmaz" )
       return PLUGIN_HANDLED
   }

   new Configsdir[64]
   new swear_file[64]
   get_configsdir( Configsdir, 63 )
   format ( swear_file, 63, "%s/kufurler_reklamlar.ini", Configsdir )

   read_args ( g_swearWords[g_swearNum], 19 )
   write_file( swear_file, "" )
   write_file( swear_file, g_swearWords[g_swearNum] )
   g_swearNum++

   id ? client_print ( id, print_console, "[Ready2Die Gaming] Yasakli Kelime Listesine Eklendi" ) : server_print ( "[K.R.E] Kelime Dosyaya Eklendi" )

   return PLUGIN_HANDLED
}

public add_replacement(id)
{
   if ( ( !(get_user_flags(id)&ADMIN_LEVEL_A) && id ) )
   {
      client_print ( id, print_console, "[Ready2Die Gaming] Erisim Engellendi" )
       return PLUGIN_HANDLED
   }

   if ( read_argc() == 1 )
   {
      client_print ( id, print_console, "[Ready2Die Gaming] Kanit Saglanmaz" )
       return PLUGIN_HANDLED
   }

   new Configsdir[64]
   new replace_file[64]
   get_configsdir( Configsdir, 63 )
   format ( replace_file, 63, "%s/degistirmeler.ini", Configsdir )

   read_args ( g_replaceLines[g_replaceNum], 191 )
   write_file( replace_file, "" )
   write_file( replace_file, g_replaceLines[g_replaceNum] )
   g_replaceNum++

   id ? client_print ( id, print_console, "[Ready2Die Gaming] Yedek Hat Listesine Eklendi" ) : server_print ( "[Kufur ve Reklam Engelleme] Yedek Hat Dosyasina Eklendi" )

   return PLUGIN_HANDLED
}

public string_cleaner( str[] )
{
   new i, len = strlen ( str )
   while ( contain ( str, " " ) != -1 )
      replace ( str, len, " ", "" )

   len = strlen ( str )
   while ( contain ( str, "|<" ) != -1 )
      replace ( str, len, "|<", "k" )

   len = strlen ( str )
   while ( contain ( str, "|>" ) != -1 )
      replace ( str, len, "|>", "p" )

   len = strlen ( str )
   while ( contain ( str, "()" ) != -1 )
      replace ( str, len, "()", "o" )

   len = strlen ( str )
   while ( contain ( str, "[]" ) != -1 )
      replace ( str, len, "[]", "o" )

   len = strlen ( str )
   while ( contain ( str, "{}" ) != -1 )
      replace ( str, len, "{}", "o" )

   len = strlen ( str )
   for ( i = 0 ; i < len ; i++ )
   {
      if ( str[i] == '@' )
         str[i] = 'a'

      if ( str[i] == '$' )
         str[i] = 's'

      if ( str[i] == '0' )
         str[i] = 'o'

      if ( str[i] == '7' )
         str[i] = 't'

      if ( str[i] == '3' )
         str[i] = 'e'

      if ( str[i] == '5' )
         str[i] = 's'

      if ( str[i] == '<' )
         str[i] = 'c'

      if ( str[i] == '3' )
         str[i] = 'e'

   }
}


stock ChatColor(const id, const input[], any:...)
{
   new count = 1, players[32]
   static msg[191]
   vformat(msg, 190, input, 3)
   
   replace_all(msg, 190, "!g", "^4")
   replace_all(msg, 190, "!y", "^3")
   replace_all(msg, 190, "!team", "^1")
   
   if (id) players[0] = id; else get_players(players, count, "ch")
   {
      for (new i = 0; i < count; i++)
      {
         if (is_user_connected(players[i]))
         {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
            write_byte(players[i]);
            write_string(msg); 
            message_end();
         }
      }
   }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/ 

Link:
Linklerini gizle
Linki Kopyala
Kullanıcı avatarı

Konu Sahibi
loneylwolfrd
Mesajlar: 46
Kayıt: Cmt Kas 25, 2017 3:14 pm
Server Ip/DNS: cs242.csduragi.com
Clan İsmi: Ready2Die ~
İletişim:

kufur engelleme plugini sıkıntısı

Mesaj gönderen loneylwolfrd »

Taha Demirbaş yazdı:Bir denermisin gerçi hata verirmi olurmu denemedim ?

Kod: Tümünü seç

#include <amxmodx>
#include <amxmisc> 

#define MAX_WORDS 150
#define MAX_REPLACE 50

new g_swearWords[MAX_WORDS][20]
new g_replaceLines[MAX_REPLACE][192]
new g_swearNum
new g_replaceNum

new g_sansursayisi[64]

new g_maxsansur
new g_sansur[64]
new bansuresi
new g_bansuresi[64]

public plugin_init()
{
   register_plugin ( "Kufur Reklam Engelleme", "1.5", "Csduragi.com-editleme redarmygaming")
   register_clcmd ( "say", "swearcheck" )
   register_clcmd ( "say_team", "swearcheck" )
   register_concmd ( "amx_addswear", "add_swear", ADMIN_LEVEL_A , "< sansurlenmesini istedigin kelimeyi yaz.. >" )
   register_concmd ( "amx_addreplacement", "add_replacement", ADMIN_LEVEL_A , "< sansur yazisini yaz.. >" )
   g_maxsansur = register_cvar("sv_kre_maxuyari","2") // maksimum uyari sayisi // 0 konulursa banlama olmayacaktır.
   get_pcvar_string(g_maxsansur,g_sansur,63)
   bansuresi = register_cvar("sv_kre_gagsuresi","300") // adam gaglama suresi
   get_pcvar_string(bansuresi,g_bansuresi,63)
   readList()
}

readList()
{
   new Configsdir[64]
   new swear_file[64], replace_file[64]
   get_configsdir( Configsdir, 63 )
   format(swear_file, 63, "%s/kufurler_reklamlar.ini", Configsdir )
   format(replace_file, 63, "%s/degistirmeler.ini", Configsdir )

   if ( !file_exists(swear_file) )
   {
      server_print ( "==========================================================" )
      server_print ( "[Kufur ve Reklam Engelleme] %s dosyasi bulunamadi", swear_file )
      server_print ( "==========================================================" )
      return
   }
   
   if ( !file_exists(replace_file) )
   {
      server_print ( "==========================================================" )
      server_print ( "[Ready2DieGaming] %s dosyasi bulunamadi", replace_file )
      server_print ( "==========================================================" )
      return
   }
   
   new len, i=0
   while( i < MAX_WORDS && read_file( swear_file, i , g_swearWords[g_swearNum], 19, len ) )
   {
      i++
      if( g_swearWords[g_swearNum][0] == ';' || len == 0 )
         continue
      g_swearNum++
   }

   i=0
   while( i < MAX_REPLACE && read_file( replace_file, i , g_replaceLines[g_replaceNum], 191, len ) )
   {
      i++
      if( g_replaceLines[g_replaceNum][0] == ';' || len == 0 )
         continue
      g_replaceNum++
   }

   server_print ( "======================================================" )
   server_print ( "[Ready2Die Gaming]  %d Yasakli Kelimeler Yuklendi", g_swearNum )
   server_print ( "[Ready2Die Gaming]  %d Yedek Hatlar Yuklendi", g_replaceNum )
   server_print ( "======================================================" )

}

public client_connect(id)
{
   new new_name[32]
   get_user_name ( id, new_name, 31 )

   string_cleaner ( new_name )
   g_sansursayisi[id] = get_pcvar_num(g_maxsansur)
   new i = 0
   while ( i < g_swearNum )
   {
      if ( containi ( new_name, g_swearWords[i++] ) != -1 )
      {
         

         return PLUGIN_CONTINUE
      }
   }
   
   return PLUGIN_CONTINUE
}
   

public swearcheck(id)
{
   /*if ( (get_user_flags(id)&ADMIN_LEVEL_A) || !id )
      return PLUGIN_CONTINUE
   */
   new said[192]
   read_args ( said, 191 )

   string_cleaner ( said )

   new i = 0
   while ( i < g_swearNum )
   {
      if (equali( said, g_swearWords[i++] ) != -1 )
      {
         new j, playercount, players[32], user_name[32], random_replace = random ( g_replaceNum )
         get_user_name ( id, user_name, 31 )
         get_players ( players, playercount, "c" )

         for ( j = 0 ; j < playercount ; j++)
         {
            if ( get_user_flags(players[j])&ADMIN_LEVEL_A )
               ChatColor(players[j],"^3[ ^4Ready2Die Gaming ^3 ] ^3 : %s^1 :^4 %s",user_name,said)
         
               
            
               
               
               
         }
            
         if(get_pcvar_num(g_maxsansur) == 0){
            return PLUGIN_HANDLED   
                  
         }
         if(g_sansursayisi[id] == 0){
               
            ChatColor(0,"^3[ ^4Ready2Die Gaming^3] ^3 %s Uyari Sayin^4 %s^3 'i gectigi icin^4 %s^3 Dakika gaglanacaksiniz..",user_name,g_sansur,g_bansuresi)   
            server_cmd("amx_gag #%d 300 abc ^"COK SAYIDA YASAKLI KELIME KULLANDIGINIZ ICIN GAGLANDINIZ.^"",get_user_userid(id));
            return PLUGIN_HANDLED
         }
         else
         {
            g_sansursayisi[id] -= 1   

            ChatColor(id,"^1[ ^4Ready2Die Gaming ^1] ^3 : Kullandigin Kelimelere Lutfen ^4 Dikkat Et ^3 Aksi Taktirde Sunucudan Otomatik ^4 [GAG] yiceksiniz.^3.!")
            ChatColor(id,"^1[ ^4Ready2Die Gaming ^1] ^3 : Kalan Tekrarlama Hakkin :^4 %d ",g_sansursayisi[id])
            ChatColor(id,"^1[ ^4Ready2Die Gaming ^1] ^3 : Sinir Tekrarlama Sayisini Gecersen ^4%s ^3Dakika gaglanacaksiniz..!",g_bansuresi)
            return PLUGIN_HANDLED
                  
         }      
         copy ( said, 191, g_replaceLines[random_replace] )
         new cmd[10]
         read_argv ( 0, cmd, 9)
         engclient_cmd ( id ,cmd ,said )

         return PLUGIN_HANDLED
      }
   }
   return PLUGIN_CONTINUE
}

public add_swear(id)
{
   if ( ( !(get_user_flags(id)&ADMIN_LEVEL_A) && id ) )
   {
      client_print ( id, print_console, "[Ready2Die Gaming] Erisim Engellendi" )
       return PLUGIN_HANDLED
   }

   if ( read_argc() == 1 )
   {
      client_print ( id, print_console, "[Ready2Die Gaming] Kanit Saglanmaz" )
       return PLUGIN_HANDLED
   }

   new Configsdir[64]
   new swear_file[64]
   get_configsdir( Configsdir, 63 )
   format ( swear_file, 63, "%s/kufurler_reklamlar.ini", Configsdir )

   read_args ( g_swearWords[g_swearNum], 19 )
   write_file( swear_file, "" )
   write_file( swear_file, g_swearWords[g_swearNum] )
   g_swearNum++

   id ? client_print ( id, print_console, "[Ready2Die Gaming] Yasakli Kelime Listesine Eklendi" ) : server_print ( "[K.R.E] Kelime Dosyaya Eklendi" )

   return PLUGIN_HANDLED
}

public add_replacement(id)
{
   if ( ( !(get_user_flags(id)&ADMIN_LEVEL_A) && id ) )
   {
      client_print ( id, print_console, "[Ready2Die Gaming] Erisim Engellendi" )
       return PLUGIN_HANDLED
   }

   if ( read_argc() == 1 )
   {
      client_print ( id, print_console, "[Ready2Die Gaming] Kanit Saglanmaz" )
       return PLUGIN_HANDLED
   }

   new Configsdir[64]
   new replace_file[64]
   get_configsdir( Configsdir, 63 )
   format ( replace_file, 63, "%s/degistirmeler.ini", Configsdir )

   read_args ( g_replaceLines[g_replaceNum], 191 )
   write_file( replace_file, "" )
   write_file( replace_file, g_replaceLines[g_replaceNum] )
   g_replaceNum++

   id ? client_print ( id, print_console, "[Ready2Die Gaming] Yedek Hat Listesine Eklendi" ) : server_print ( "[Kufur ve Reklam Engelleme] Yedek Hat Dosyasina Eklendi" )

   return PLUGIN_HANDLED
}

public string_cleaner( str[] )
{
   new i, len = strlen ( str )
   while ( contain ( str, " " ) != -1 )
      replace ( str, len, " ", "" )

   len = strlen ( str )
   while ( contain ( str, "|<" ) != -1 )
      replace ( str, len, "|<", "k" )

   len = strlen ( str )
   while ( contain ( str, "|>" ) != -1 )
      replace ( str, len, "|>", "p" )

   len = strlen ( str )
   while ( contain ( str, "()" ) != -1 )
      replace ( str, len, "()", "o" )

   len = strlen ( str )
   while ( contain ( str, "[]" ) != -1 )
      replace ( str, len, "[]", "o" )

   len = strlen ( str )
   while ( contain ( str, "{}" ) != -1 )
      replace ( str, len, "{}", "o" )

   len = strlen ( str )
   for ( i = 0 ; i < len ; i++ )
   {
      if ( str[i] == '@' )
         str[i] = 'a'

      if ( str[i] == '$' )
         str[i] = 's'

      if ( str[i] == '0' )
         str[i] = 'o'

      if ( str[i] == '7' )
         str[i] = 't'

      if ( str[i] == '3' )
         str[i] = 'e'

      if ( str[i] == '5' )
         str[i] = 's'

      if ( str[i] == '<' )
         str[i] = 'c'

      if ( str[i] == '3' )
         str[i] = 'e'

   }
}


stock ChatColor(const id, const input[], any:...)
{
   new count = 1, players[32]
   static msg[191]
   vformat(msg, 190, input, 3)
   
   replace_all(msg, 190, "!g", "^4")
   replace_all(msg, 190, "!y", "^3")
   replace_all(msg, 190, "!team", "^1")
   
   if (id) players[0] = id; else get_players(players, count, "ch")
   {
      for (new i = 0; i < count; i++)
      {
         if (is_user_connected(players[i]))
         {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
            write_byte(players[i]);
            write_string(msg); 
            message_end();
         }
      }
   }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/

Resim

derlemede böyle bir hata verdi

Link:
Linklerini gizle
Linki Kopyala
Kullanıcı avatarı

Konu Sahibi
loneylwolfrd
Mesajlar: 46
Kayıt: Cmt Kas 25, 2017 3:14 pm
Server Ip/DNS: cs242.csduragi.com
Clan İsmi: Ready2Die ~
İletişim:

kufur engelleme plugini sıkıntısı

Mesaj gönderen loneylwolfrd »

hata verdi ama yüklendi servera işe yaramadı engellemiş kelimelerin içine s*k koyuyorum oyuncular /sikayet yazdiklarinda bile gagı yapıştırıyor varmı başka sansür filan atan da olur calışan bir kufur engelleme plugini

Link:
Linklerini gizle
Linki Kopyala
Kullanıcı avatarı

Konu Sahibi
loneylwolfrd
Mesajlar: 46
Kayıt: Cmt Kas 25, 2017 3:14 pm
Server Ip/DNS: cs242.csduragi.com
Clan İsmi: Ready2Die ~
İletişim:

kufur engelleme plugini sıkıntısı

Mesaj gönderen loneylwolfrd »

derlemedeki verdigi hatada bu
https://i.hizliresim.com/vJvmdA.png

Link:
Linklerini gizle
Linki Kopyala
Kullanıcı avatarı

Taha Demirbaş
Mesajlar: 10423
Kayıt: Cum Tem 08, 2016 10:05 pm
Konum: Türkiye
İletişim:

kufur engelleme plugini sıkıntısı

Mesaj gönderen Taha Demirbaş »

gördüğüm hatalar benden kaynaklı değil sadece tek satır ile işlem yapıyorum. bunu bir deneyin.

Kod: Tümünü seç

#include <amxmodx>
#include <amxmisc> 

#define MAX_WORDS 150
#define MAX_REPLACE 50

new g_swearWords[MAX_WORDS][20]
new g_replaceLines[MAX_REPLACE][192]
new g_swearNum
new g_replaceNum

new g_sansursayisi[64]

new g_maxsansur
new g_sansur[64]
new bansuresi
new g_bansuresi[64]

public plugin_init()
{
   register_plugin ( "Kufur Reklam Engelleme", "1.5", "Csduragi.com-editleme redarmygaming")
   register_clcmd ( "say", "swearcheck" )
   register_clcmd ( "say_team", "swearcheck" )
   register_concmd ( "amx_addswear", "add_swear", ADMIN_LEVEL_A , "< sansurlenmesini istedigin kelimeyi yaz.. >" )
   register_concmd ( "amx_addreplacement", "add_replacement", ADMIN_LEVEL_A , "< sansur yazisini yaz.. >" )
   g_maxsansur = register_cvar("sv_kre_maxuyari","2") // maksimum uyari sayisi // 0 konulursa banlama olmayacaktır.
   get_pcvar_string(g_maxsansur,g_sansur,63)
   bansuresi = register_cvar("sv_kre_gagsuresi","300") // adam gaglama suresi
   get_pcvar_string(bansuresi,g_bansuresi,63)
   readList()
}

readList()
{
   new Configsdir[64]
   new swear_file[64], replace_file[64]
   get_configsdir( Configsdir, 63 )
   format(swear_file, 63, "%s/kufurler_reklamlar.ini", Configsdir )
   format(replace_file, 63, "%s/degistirmeler.ini", Configsdir )

   if ( !file_exists(swear_file) )
   {
      server_print ( "==========================================================" )
      server_print ( "[Kufur ve Reklam Engelleme] %s dosyasi bulunamadi", swear_file )
      server_print ( "==========================================================" )
      return
   }
   
   if ( !file_exists(replace_file) )
   {
      server_print ( "==========================================================" )
      server_print ( "[Ready2DieGaming] %s dosyasi bulunamadi", replace_file )
      server_print ( "==========================================================" )
      return
   }
   
   new len, i=0
   while( i < MAX_WORDS && read_file( swear_file, i , g_swearWords[g_swearNum], 19, len ) )
   {
      i++
      if( g_swearWords[g_swearNum][0] == ';' || len == 0 )
         continue
      g_swearNum++
   }

   i=0
   while( i < MAX_REPLACE && read_file( replace_file, i , g_replaceLines[g_replaceNum], 191, len ) )
   {
      i++
      if( g_replaceLines[g_replaceNum][0] == ';' || len == 0 )
         continue
      g_replaceNum++
   }

   server_print ( "======================================================" )
   server_print ( "[Ready2Die Gaming]  %d Yasakli Kelimeler Yuklendi", g_swearNum )
   server_print ( "[Ready2Die Gaming]  %d Yedek Hatlar Yuklendi", g_replaceNum )
   server_print ( "======================================================" )

}

public client_connect(id)
{
   new new_name[32]
   get_user_name ( id, new_name, 31 )

   string_cleaner ( new_name )
   g_sansursayisi[id] = get_pcvar_num(g_maxsansur)
   new i = 0
   while ( i < g_swearNum )
   {
      if ( containi ( new_name, g_swearWords[i++] ) != -1 )
      {
         

         return PLUGIN_CONTINUE
      }
   }
   
   return PLUGIN_CONTINUE
}
   

public swearcheck(id)
{
   /*if ( (get_user_flags(id)&ADMIN_LEVEL_A) || !id )
      return PLUGIN_CONTINUE
   */
   new said[192]
   read_args ( said, 191 )

   string_cleaner ( said )

   new i = 0
   while ( i < g_swearNum )
   {
      if (said[id] == g_swearWords[i++]  )
      {
         new j, playercount, players[32], user_name[32], random_replace = random ( g_replaceNum )
         get_user_name ( id, user_name, 31 )
         get_players ( players, playercount, "c" )

         for ( j = 0 ; j < playercount ; j++)
         {
            if ( get_user_flags(players[j])&ADMIN_LEVEL_A )
               ChatColor(players[j],"^3[ ^4Ready2Die Gaming ^3 ] ^3 : %s^1 :^4 %s",user_name,said)
         
               
            
               
               
               
         }
            
         if(get_pcvar_num(g_maxsansur) == 0){
            return PLUGIN_HANDLED   
                  
         }
         if(g_sansursayisi[id] == 0){
               
            ChatColor(0,"^3[ ^4Ready2Die Gaming^3] ^3 %s Uyari Sayin^4 %s^3 'i gectigi icin^4 %s^3 Dakika gaglanacaksiniz..",user_name,g_sansur,g_bansuresi)   
            server_cmd("amx_gag #%d 300 abc ^"COK SAYIDA YASAKLI KELIME KULLANDIGINIZ ICIN GAGLANDINIZ.^"",get_user_userid(id));
            return PLUGIN_HANDLED
         }
         else
         {
            g_sansursayisi[id] -= 1   

            ChatColor(id,"^1[ ^4Ready2Die Gaming ^1] ^3 : Kullandigin Kelimelere Lutfen ^4 Dikkat Et ^3 Aksi Taktirde Sunucudan Otomatik ^4 [GAG] yiceksiniz.^3.!")
            ChatColor(id,"^1[ ^4Ready2Die Gaming ^1] ^3 : Kalan Tekrarlama Hakkin :^4 %d ",g_sansursayisi[id])
            ChatColor(id,"^1[ ^4Ready2Die Gaming ^1] ^3 : Sinir Tekrarlama Sayisini Gecersen ^4%s ^3Dakika gaglanacaksiniz..!",g_bansuresi)
            return PLUGIN_HANDLED
                  
         }      
         copy ( said, 191, g_replaceLines[random_replace] )
         new cmd[10]
         read_argv ( 0, cmd, 9)
         engclient_cmd ( id ,cmd ,said )

         return PLUGIN_HANDLED
      }
   }
   return PLUGIN_CONTINUE
}

public add_swear(id)
{
   if ( ( !(get_user_flags(id)&ADMIN_LEVEL_A) && id ) )
   {
      client_print ( id, print_console, "[Ready2Die Gaming] Erisim Engellendi" )
       return PLUGIN_HANDLED
   }

   if ( read_argc() == 1 )
   {
      client_print ( id, print_console, "[Ready2Die Gaming] Kanit Saglanmaz" )
       return PLUGIN_HANDLED
   }

   new Configsdir[64]
   new swear_file[64]
   get_configsdir( Configsdir, 63 )
   format ( swear_file, 63, "%s/kufurler_reklamlar.ini", Configsdir )

   read_args ( g_swearWords[g_swearNum], 19 )
   write_file( swear_file, "" )
   write_file( swear_file, g_swearWords[g_swearNum] )
   g_swearNum++

   id ? client_print ( id, print_console, "[Ready2Die Gaming] Yasakli Kelime Listesine Eklendi" ) : server_print ( "[K.R.E] Kelime Dosyaya Eklendi" )

   return PLUGIN_HANDLED
}

public add_replacement(id)
{
   if ( ( !(get_user_flags(id)&ADMIN_LEVEL_A) && id ) )
   {
      client_print ( id, print_console, "[Ready2Die Gaming] Erisim Engellendi" )
       return PLUGIN_HANDLED
   }

   if ( read_argc() == 1 )
   {
      client_print ( id, print_console, "[Ready2Die Gaming] Kanit Saglanmaz" )
       return PLUGIN_HANDLED
   }

   new Configsdir[64]
   new replace_file[64]
   get_configsdir( Configsdir, 63 )
   format ( replace_file, 63, "%s/degistirmeler.ini", Configsdir )

   read_args ( g_replaceLines[g_replaceNum], 191 )
   write_file( replace_file, "" )
   write_file( replace_file, g_replaceLines[g_replaceNum] )
   g_replaceNum++

   id ? client_print ( id, print_console, "[Ready2Die Gaming] Yedek Hat Listesine Eklendi" ) : server_print ( "[Kufur ve Reklam Engelleme] Yedek Hat Dosyasina Eklendi" )

   return PLUGIN_HANDLED
}

public string_cleaner( str[] )
{
   new i, len = strlen ( str )
   while ( contain ( str, " " ) != -1 )
      replace ( str, len, " ", "" )

   len = strlen ( str )
   while ( contain ( str, "|<" ) != -1 )
      replace ( str, len, "|<", "k" )

   len = strlen ( str )
   while ( contain ( str, "|>" ) != -1 )
      replace ( str, len, "|>", "p" )

   len = strlen ( str )
   while ( contain ( str, "()" ) != -1 )
      replace ( str, len, "()", "o" )

   len = strlen ( str )
   while ( contain ( str, "[]" ) != -1 )
      replace ( str, len, "[]", "o" )

   len = strlen ( str )
   while ( contain ( str, "{}" ) != -1 )
      replace ( str, len, "{}", "o" )

   len = strlen ( str )
   for ( i = 0 ; i < len ; i++ )
   {
      if ( str[i] == '@' )
         str[i] = 'a'

      if ( str[i] == '$' )
         str[i] = 's'

      if ( str[i] == '0' )
         str[i] = 'o'

      if ( str[i] == '7' )
         str[i] = 't'

      if ( str[i] == '3' )
         str[i] = 'e'

      if ( str[i] == '5' )
         str[i] = 's'

      if ( str[i] == '<' )
         str[i] = 'c'

      if ( str[i] == '3' )
         str[i] = 'e'

   }
}


stock ChatColor(const id, const input[], any:...)
{
   new count = 1, players[32]
   static msg[191]
   vformat(msg, 190, input, 3)
   
   replace_all(msg, 190, "!g", "^4")
   replace_all(msg, 190, "!y", "^3")
   replace_all(msg, 190, "!team", "^1")
   
   if (id) players[0] = id; else get_players(players, count, "ch")
   {
      for (new i = 0; i < count; i++)
      {
         if (is_user_connected(players[i]))
         {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
            write_byte(players[i]);
            write_string(msg); 
            message_end();
         }
      }
   }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/

 

Link:
Linklerini gizle
Linki Kopyala
Kullanıcı avatarı

Konu Sahibi
loneylwolfrd
Mesajlar: 46
Kayıt: Cmt Kas 25, 2017 3:14 pm
Server Ip/DNS: cs242.csduragi.com
Clan İsmi: Ready2Die ~
İletişim:

kufur engelleme plugini sıkıntısı

Mesaj gönderen loneylwolfrd »

Taha Demirbaş yazdı:gördüğüm hatalar benden kaynaklı değil sadece tek satır ile işlem yapıyorum. bunu bir deneyin.

Kod: Tümünü seç

#include <amxmodx>
#include <amxmisc> 

#define MAX_WORDS 150
#define MAX_REPLACE 50

new g_swearWords[MAX_WORDS][20]
new g_replaceLines[MAX_REPLACE][192]
new g_swearNum
new g_replaceNum

new g_sansursayisi[64]

new g_maxsansur
new g_sansur[64]
new bansuresi
new g_bansuresi[64]

public plugin_init()
{
   register_plugin ( "Kufur Reklam Engelleme", "1.5", "Csduragi.com-editleme redarmygaming")
   register_clcmd ( "say", "swearcheck" )
   register_clcmd ( "say_team", "swearcheck" )
   register_concmd ( "amx_addswear", "add_swear", ADMIN_LEVEL_A , "< sansurlenmesini istedigin kelimeyi yaz.. >" )
   register_concmd ( "amx_addreplacement", "add_replacement", ADMIN_LEVEL_A , "< sansur yazisini yaz.. >" )
   g_maxsansur = register_cvar("sv_kre_maxuyari","2") // maksimum uyari sayisi // 0 konulursa banlama olmayacaktır.
   get_pcvar_string(g_maxsansur,g_sansur,63)
   bansuresi = register_cvar("sv_kre_gagsuresi","300") // adam gaglama suresi
   get_pcvar_string(bansuresi,g_bansuresi,63)
   readList()
}

readList()
{
   new Configsdir[64]
   new swear_file[64], replace_file[64]
   get_configsdir( Configsdir, 63 )
   format(swear_file, 63, "%s/kufurler_reklamlar.ini", Configsdir )
   format(replace_file, 63, "%s/degistirmeler.ini", Configsdir )

   if ( !file_exists(swear_file) )
   {
      server_print ( "==========================================================" )
      server_print ( "[Kufur ve Reklam Engelleme] %s dosyasi bulunamadi", swear_file )
      server_print ( "==========================================================" )
      return
   }
   
   if ( !file_exists(replace_file) )
   {
      server_print ( "==========================================================" )
      server_print ( "[Ready2DieGaming] %s dosyasi bulunamadi", replace_file )
      server_print ( "==========================================================" )
      return
   }
   
   new len, i=0
   while( i < MAX_WORDS && read_file( swear_file, i , g_swearWords[g_swearNum], 19, len ) )
   {
      i++
      if( g_swearWords[g_swearNum][0] == ';' || len == 0 )
         continue
      g_swearNum++
   }

   i=0
   while( i < MAX_REPLACE && read_file( replace_file, i , g_replaceLines[g_replaceNum], 191, len ) )
   {
      i++
      if( g_replaceLines[g_replaceNum][0] == ';' || len == 0 )
         continue
      g_replaceNum++
   }

   server_print ( "======================================================" )
   server_print ( "[Ready2Die Gaming]  %d Yasakli Kelimeler Yuklendi", g_swearNum )
   server_print ( "[Ready2Die Gaming]  %d Yedek Hatlar Yuklendi", g_replaceNum )
   server_print ( "======================================================" )

}

public client_connect(id)
{
   new new_name[32]
   get_user_name ( id, new_name, 31 )

   string_cleaner ( new_name )
   g_sansursayisi[id] = get_pcvar_num(g_maxsansur)
   new i = 0
   while ( i < g_swearNum )
   {
      if ( containi ( new_name, g_swearWords[i++] ) != -1 )
      {
         

         return PLUGIN_CONTINUE
      }
   }
   
   return PLUGIN_CONTINUE
}
   

public swearcheck(id)
{
   /*if ( (get_user_flags(id)&ADMIN_LEVEL_A) || !id )
      return PLUGIN_CONTINUE
   */
   new said[192]
   read_args ( said, 191 )

   string_cleaner ( said )

   new i = 0
   while ( i < g_swearNum )
   {
      if (said[id] == g_swearWords[i++]  )
      {
         new j, playercount, players[32], user_name[32], random_replace = random ( g_replaceNum )
         get_user_name ( id, user_name, 31 )
         get_players ( players, playercount, "c" )

         for ( j = 0 ; j < playercount ; j++)
         {
            if ( get_user_flags(players[j])&ADMIN_LEVEL_A )
               ChatColor(players[j],"^3[ ^4Ready2Die Gaming ^3 ] ^3 : %s^1 :^4 %s",user_name,said)
         
               
            
               
               
               
         }
            
         if(get_pcvar_num(g_maxsansur) == 0){
            return PLUGIN_HANDLED   
                  
         }
         if(g_sansursayisi[id] == 0){
               
            ChatColor(0,"^3[ ^4Ready2Die Gaming^3] ^3 %s Uyari Sayin^4 %s^3 'i gectigi icin^4 %s^3 Dakika gaglanacaksiniz..",user_name,g_sansur,g_bansuresi)   
            server_cmd("amx_gag #%d 300 abc ^"COK SAYIDA YASAKLI KELIME KULLANDIGINIZ ICIN GAGLANDINIZ.^"",get_user_userid(id));
            return PLUGIN_HANDLED
         }
         else
         {
            g_sansursayisi[id] -= 1   

            ChatColor(id,"^1[ ^4Ready2Die Gaming ^1] ^3 : Kullandigin Kelimelere Lutfen ^4 Dikkat Et ^3 Aksi Taktirde Sunucudan Otomatik ^4 [GAG] yiceksiniz.^3.!")
            ChatColor(id,"^1[ ^4Ready2Die Gaming ^1] ^3 : Kalan Tekrarlama Hakkin :^4 %d ",g_sansursayisi[id])
            ChatColor(id,"^1[ ^4Ready2Die Gaming ^1] ^3 : Sinir Tekrarlama Sayisini Gecersen ^4%s ^3Dakika gaglanacaksiniz..!",g_bansuresi)
            return PLUGIN_HANDLED
                  
         }      
         copy ( said, 191, g_replaceLines[random_replace] )
         new cmd[10]
         read_argv ( 0, cmd, 9)
         engclient_cmd ( id ,cmd ,said )

         return PLUGIN_HANDLED
      }
   }
   return PLUGIN_CONTINUE
}

public add_swear(id)
{
   if ( ( !(get_user_flags(id)&ADMIN_LEVEL_A) && id ) )
   {
      client_print ( id, print_console, "[Ready2Die Gaming] Erisim Engellendi" )
       return PLUGIN_HANDLED
   }

   if ( read_argc() == 1 )
   {
      client_print ( id, print_console, "[Ready2Die Gaming] Kanit Saglanmaz" )
       return PLUGIN_HANDLED
   }

   new Configsdir[64]
   new swear_file[64]
   get_configsdir( Configsdir, 63 )
   format ( swear_file, 63, "%s/kufurler_reklamlar.ini", Configsdir )

   read_args ( g_swearWords[g_swearNum], 19 )
   write_file( swear_file, "" )
   write_file( swear_file, g_swearWords[g_swearNum] )
   g_swearNum++

   id ? client_print ( id, print_console, "[Ready2Die Gaming] Yasakli Kelime Listesine Eklendi" ) : server_print ( "[K.R.E] Kelime Dosyaya Eklendi" )

   return PLUGIN_HANDLED
}

public add_replacement(id)
{
   if ( ( !(get_user_flags(id)&ADMIN_LEVEL_A) && id ) )
   {
      client_print ( id, print_console, "[Ready2Die Gaming] Erisim Engellendi" )
       return PLUGIN_HANDLED
   }

   if ( read_argc() == 1 )
   {
      client_print ( id, print_console, "[Ready2Die Gaming] Kanit Saglanmaz" )
       return PLUGIN_HANDLED
   }

   new Configsdir[64]
   new replace_file[64]
   get_configsdir( Configsdir, 63 )
   format ( replace_file, 63, "%s/degistirmeler.ini", Configsdir )

   read_args ( g_replaceLines[g_replaceNum], 191 )
   write_file( replace_file, "" )
   write_file( replace_file, g_replaceLines[g_replaceNum] )
   g_replaceNum++

   id ? client_print ( id, print_console, "[Ready2Die Gaming] Yedek Hat Listesine Eklendi" ) : server_print ( "[Kufur ve Reklam Engelleme] Yedek Hat Dosyasina Eklendi" )

   return PLUGIN_HANDLED
}

public string_cleaner( str[] )
{
   new i, len = strlen ( str )
   while ( contain ( str, " " ) != -1 )
      replace ( str, len, " ", "" )

   len = strlen ( str )
   while ( contain ( str, "|<" ) != -1 )
      replace ( str, len, "|<", "k" )

   len = strlen ( str )
   while ( contain ( str, "|>" ) != -1 )
      replace ( str, len, "|>", "p" )

   len = strlen ( str )
   while ( contain ( str, "()" ) != -1 )
      replace ( str, len, "()", "o" )

   len = strlen ( str )
   while ( contain ( str, "[]" ) != -1 )
      replace ( str, len, "[]", "o" )

   len = strlen ( str )
   while ( contain ( str, "{}" ) != -1 )
      replace ( str, len, "{}", "o" )

   len = strlen ( str )
   for ( i = 0 ; i < len ; i++ )
   {
      if ( str[i] == '@' )
         str[i] = 'a'

      if ( str[i] == '$' )
         str[i] = 's'

      if ( str[i] == '0' )
         str[i] = 'o'

      if ( str[i] == '7' )
         str[i] = 't'

      if ( str[i] == '3' )
         str[i] = 'e'

      if ( str[i] == '5' )
         str[i] = 's'

      if ( str[i] == '<' )
         str[i] = 'c'

      if ( str[i] == '3' )
         str[i] = 'e'

   }
}


stock ChatColor(const id, const input[], any:...)
{
   new count = 1, players[32]
   static msg[191]
   vformat(msg, 190, input, 3)
   
   replace_all(msg, 190, "!g", "^4")
   replace_all(msg, 190, "!y", "^3")
   replace_all(msg, 190, "!team", "^1")
   
   if (id) players[0] = id; else get_players(players, count, "ch")
   {
      for (new i = 0; i < count; i++)
      {
         if (is_user_connected(players[i]))
         {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
            write_byte(players[i]);
            write_string(msg); 
            message_end();
         }
      }
   }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/


bu seferde ayrıyetten bir hata daha verdi ve yüklenmedi yani amxx cevrilmedi bile



//cstrike/addons/amxmodx/scripting/antikufurfix_v2.sma(117) : error 033: array must be indexed (variable "g_swearWords")
//cstrike/addons/amxmodx/scripting/antikufurfix_v2.sma(155) : warning 225: unreachable code
//cstrike/addons/amxmodx/scripting/antikufurfix_v2.sma(171) : warning 217: loose indentation
//cstrike/addons/amxmodx/scripting/antikufurfix_v2.sma(177) : warning 217: loose indentation
//cstrike/addons/amxmodx/scripting/antikufurfix_v2.sma(200) : warning 217: loose indentation
//cstrike/addons/amxmodx/scripting/antikufurfix_v2.sma(206) : warning 217: loose indentation

Link:
Linklerini gizle
Linki Kopyala
Cevapla