Modificare Swear

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori

mr.f3lyx
Membru, skill +2
Membru, skill +2
Posts: 624
Joined: 10 Nov 2013, 20:24
Detinator Steam: Da
Location: Palermo, Italy
Has thanked: 69 times
Been thanked: 18 times
Contact:

04 Jul 2014, 10:48

Buna am si eu un plugin si asi dori daca ma puteti ajuta sa il modificati
Modificarile ; Pai cand cineva scrie un cuvat si este cenzurat asi vrea sa nu mai apara asa m*** si sa nu mai apara deloc si sai apara jucatorului un mesaji care dar el sal poata vedea gen "Atentie ce vorbesti! Mesajul a fost blocat!"

Va multumesc celor care vor incerca sa ma ajute un click nu ii nimic : :)
sma | Afiseaza codul
#include <amxmodx>
#include <amxmisc> 

// max number of words in word list 
#define MAX_WORDS 192 

new g_swearsNames[MAX_WORDS][32] 
new g_swearsNum 

public plugin_init() 
{ 
	register_plugin("Swear Filter","1.0a","SuicideDog") 
	register_clcmd("say","swearcheck") 
	register_clcmd("say_team","swearcheck")
	readList()
}

readList() 
{ 
    // file to read words from 
	new szCustomDir[64]
	new filename[64]
	get_customdir( szCustomDir, 63 )
	format(filename, 63, "%s/swear/swearwords.ini", szCustomDir )

	if(!file_exists(filename) ){
		log_message("Swear Filter: file %s not found", filename) 
		return 
	} 
	new iLen 
	while( g_swearsNum < MAX_WORDS && read_file(filename, g_swearsNum ,g_swearsNames[g_swearsNum][1],30,iLen) ) 
	{ 
	if( g_swearsNames[g_swearsNum][0] == ';') continue
	g_swearsNames[g_swearsNum][0] = iLen 
	++g_swearsNum 
	}
	log_message("Swear Filter: loaded %d words",g_swearsNum ) 
} 

public swearcheck(id) 
{
	new szSaid[192]
	read_args(szSaid,191)
	new bool:found = false
	new pos, i = 0
	while ( i < g_swearsNum )
	{
	if ( (pos = containi(szSaid,g_swearsNames[1])) != -1 ){ 
		new len = g_swearsNames[0] 
		while(len--)
		szSaid[pos++] = '*'
		found = true 
		continue
	}
	++i
	}
	if ( found ){ 
		new cmd[32]
		read_argv(0,cmd,31)          
		engclient_cmd(id,cmd,szSaid)    
	}
	return PLUGIN_CONTINUE 
}
eXtreamSHOP
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2155
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 33 times
Been thanked: 349 times
Contact:

04 Jul 2014, 11:12

| Afiseaza codul
#include <amxmodx>
#include <amxmisc> 

// max number of words in word list 
#define MAX_WORDS 192 

new g_swearsNames[MAX_WORDS][32] 
new g_swearsNum 

public plugin_init() 
{ 
	register_plugin("Swear Filter","1.0a","SuicideDog") 
	register_clcmd("say","swearcheck") 
	register_clcmd("say_team","swearcheck")
	readList()
}

readList() 
{ 
    // file to read words from 
	new szCustomDir[64]
	new filename[64]
	get_customdir( szCustomDir, 63 )
	format(filename, 63, "%s/swear/swearwords.ini", szCustomDir )

	if(!file_exists(filename) ){
		log_message("Swear Filter: file %s not found", filename) 
		return 
	} 
	new iLen 
	while( g_swearsNum < MAX_WORDS && read_file(filename, g_swearsNum ,g_swearsNames[g_swearsNum][1],30,iLen) ) 
	{ 
	if( g_swearsNames[g_swearsNum][0] == ';') continue
	g_swearsNames[g_swearsNum][0] = iLen 
	++g_swearsNum 
	}
	log_message("Swear Filter: loaded %d words",g_swearsNum ) 
} 

public swearcheck(id) 
{
	new szSaid[192]
	read_args(szSaid,191)
	new bool:found = false
	new pos, i = 0
	while ( i < g_swearsNum )
	{
	if ( (pos = containi(szSaid,g_swearsNames[1])) != -1 ){ 
		new len = g_swearsNames[0] 
		while(len--)
		szSaid[pos++] = ' '
		client_print ( id , print_chat , "Atentie ce vorbesti ! Mesajul a fost blocat !" );
		found = true 
		continue
	}
	++i
	}
	if ( found ){ 
		new cmd[32]
		read_argv(0,cmd,31)          
		engclient_cmd(id,cmd,szSaid)    
	}
	return PLUGIN_CONTINUE 
}
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
* Inactiv momentan.
mr.f3lyx
Membru, skill +2
Membru, skill +2
Posts: 624
Joined: 10 Nov 2013, 20:24
Detinator Steam: Da
Location: Palermo, Italy
Has thanked: 69 times
Been thanked: 18 times
Contact:

04 Jul 2014, 13:55

l-am testat si culmea :))) nu ascunde nimic jucatori pot injura in liniste :)))
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2155
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 33 times
Been thanked: 349 times
Contact:

04 Jul 2014, 15:57

Ciudat, normal asa ar fi corect..
| Afiseaza codul
#include <amxmodx>
#include <amxmisc> 

// max number of words in word list 
#define MAX_WORDS 192 

new g_swearsNames[MAX_WORDS][32] 
new g_swearsNum 

public plugin_init() 
{ 
	register_plugin("Swear Filter","1.0a","SuicideDog") 
	register_clcmd("say","swearcheck") 
	register_clcmd("say_team","swearcheck")
	readList()
}

readList() 
{ 
    // file to read words from 
	new szCustomDir[64]
	new filename[64]
	get_customdir( szCustomDir, 63 )
	format(filename, 63, "%s/swear/swearwords.ini", szCustomDir )

	if(!file_exists(filename) ){
		log_message("Swear Filter: file %s not found", filename) 
		return 
	} 
	new iLen 
	while( g_swearsNum < MAX_WORDS && read_file(filename, g_swearsNum ,g_swearsNames[g_swearsNum][1],30,iLen) ) 
	{ 
	if( g_swearsNames[g_swearsNum][0] == ';') continue
	g_swearsNames[g_swearsNum][0] = iLen 
	++g_swearsNum 
	}
	log_message("Swear Filter: loaded %d words",g_swearsNum ) 
} 

public swearcheck(id) 
{
	new szSaid[192]
	read_args(szSaid,191)
	new bool:found = false
	new pos, i = 0
	while ( i < g_swearsNum )
	{
	if ( (pos = containi(szSaid,g_swearsNames[1])) != -1 ){ 
		new len = g_swearsNames[0] 
		while(len--)
		szSaid[pos++] = '  '
		client_print ( id , print_chat , "Atentie ce vorbesti ! Mesajul a fost blocat !" );
		found = true 
		continue
	}
	++i
	}
	if ( found ){ 
		new cmd[32]
		read_argv(0,cmd,31)          
		engclient_cmd(id,cmd,szSaid)    
	}
	return PLUGIN_CONTINUE 
}
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
* Inactiv momentan.
mr.f3lyx
Membru, skill +2
Membru, skill +2
Posts: 624
Joined: 10 Nov 2013, 20:24
Detinator Steam: Da
Location: Palermo, Italy
Has thanked: 69 times
Been thanked: 18 times
Contact:

04 Jul 2014, 20:30

o rezolvare cineva ?
mr.f3lyx
Membru, skill +2
Membru, skill +2
Posts: 624
Joined: 10 Nov 2013, 20:24
Detinator Steam: Da
Location: Palermo, Italy
Has thanked: 69 times
Been thanked: 18 times
Contact:

05 Jul 2014, 17:24

Am incercat sa fac eu un plugin .... dar nu stiu daca mi-a esit e facut din mai multe pluginuri
ma corecteaza cineva ?
sma | Afiseaza codul
#include <amxmodx> 
#include <amxmisc> 

#define MAX_WORDS 999
#define MAX_LEN 32 

new gsWords[ MAX_WORDS ][ MAX_LEN ]; 
new giNumWords; 

new gsWordFile[] = "addons/amxmodx/configs/cuvinte_gag.ini"; 


public plugin_init()  
{ 
register_plugin( "test", "0.1", "test" ) 

register_clcmd( "say", "cmdSay" ); 
register_clcmd( "say_team", "cmdSay" ); 


new lines = file_size( gsWordFile, 1 ), txtlen; 
for( new i ; i < lines && giNumWords < MAX_WORDS ; i ++ ) 
{ 
read_file( gsWordFile, i , gsWords[ giNumWords++ ], charsmax( gsWords[ ] ), txtlen ); 
} 
} 

public cmdSay( id ) 
{ 

new say[ 256 ]; 
read_args( say, charsmax( say ) ); 
remove_quotes( say );

for( new i ; i < giNumWords ; i ++ ) 
{ 
if( contain( say, gsWords[ i ] ) != -1 ) 
{ 

client_print ( id , print_chat , "Atentie ce vorbesti ! Mesajul a fost blocat !" );


return PLUGIN_HANDLED; 
} 
} 

return PLUGIN_CONTINUE; 
}
#Vali
Fost moderator
Fost moderator
Posts: 2624
Joined: 24 Jan 2012, 11:00
Detinator Steam: Da
SteamID: id/spryt3
Reputatie: Fost Moderator
Fost Scripter eXtreamCS.com
1.2 / 3
Location: root
Has thanked: 81 times
Been thanked: 149 times
Contact:

05 Jul 2014, 18:43

Incearca asa
| Afiseaza codul
#include <amxmodx>
#include <amxmisc> 

// max number of words in word list 
#define MAX_WORDS 192 

new g_swearsNames[MAX_WORDS][32] 
new g_swearsNum 

public plugin_init() 
{ 
	register_plugin("Swear Filter","1.0a","SuicideDog") 
	register_clcmd("say","swearcheck") 
	register_clcmd("say_team","swearcheck")
	readList()
}

readList() 
{ 
    // file to read words from 
	new szCustomDir[64]
	new filename[64]
	get_customdir( szCustomDir, 63 )
	format(filename, 63, "%s/swear/swearwords.ini", szCustomDir )

	if(!file_exists(filename) ){
		log_message("Swear Filter: file %s not found", filename) 
		return 
	} 
	new iLen 
	while( g_swearsNum < MAX_WORDS && read_file(filename, g_swearsNum ,g_swearsNames[g_swearsNum][1],30,iLen) ) 
	{ 
	if( g_swearsNames[g_swearsNum][0] == ';') continue
	g_swearsNames[g_swearsNum][0] = iLen 
	++g_swearsNum 
	}
	log_message("Swear Filter: loaded %d words",g_swearsNum ) 
} 

public swearcheck(id) 
{
	new szSaid[192]
	read_args(szSaid,191)
	new bool:found = false
	new  pos ,i = 0
	while ( i < g_swearsNum )
	{
	if ( (pos = containi(szSaid,g_swearsNames[1])) != -1 ){ 
		new len = g_swearsNames[0] 
		while(len--)
		found = true 
		continue
	}
	++i
	}
	if ( found ){     
		client_print(id,print_chat,"Esti prost numai injura..")
		return PLUGIN_HANDLED;
	}
	return PLUGIN_CONTINUE 
}
mr.f3lyx
Membru, skill +2
Membru, skill +2
Posts: 624
Joined: 10 Nov 2013, 20:24
Detinator Steam: Da
Location: Palermo, Italy
Has thanked: 69 times
Been thanked: 18 times
Contact:

05 Jul 2014, 18:50

edit/
Last edited by mr.f3lyx on 06 Jul 2014, 23:41, edited 1 time in total.
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2155
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 33 times
Been thanked: 349 times
Contact:

05 Jul 2014, 20:13

Incearca asa

E .SMA din primul post al tau, cererea
| Afiseaza codul
#include <amxmodx>
#include <amxmisc> 

// max number of words in word list 
#define MAX_WORDS 192 

new g_swearsNames[MAX_WORDS][32] 
new g_swearsNum 

public plugin_init() 
{ 
	register_plugin("Swear Filter","1.0a","SuicideDog") 
	register_clcmd("say","swearcheck") 
	register_clcmd("say_team","swearcheck")
	readList()
}

readList() 
{ 
    // file to read words from 
	new szCustomDir[64]
	new filename[64]
	get_customdir( szCustomDir, 63 )
	format(filename, 63, "%s/swear/swearwords.ini", szCustomDir )

	if(!file_exists(filename) ){
		log_message("Swear Filter: file %s not found", filename) 
		return 
	} 
	new iLen 
	while( g_swearsNum < MAX_WORDS && read_file(filename, g_swearsNum ,g_swearsNames[g_swearsNum][1],30,iLen) ) 
	{ 
	if( g_swearsNames[g_swearsNum][0] == ';') continue
	g_swearsNames[g_swearsNum][0] = iLen 
	++g_swearsNum 
	}
	log_message("Swear Filter: loaded %d words",g_swearsNum ) 
} 

public swearcheck(id) 
{
	new szSaid[192]
	read_args(szSaid,191)
	new bool:found = false
	new /*pos,*/ i = 0
	while ( i < g_swearsNum )
	{
	if ( (/*pos = */containi(szSaid,g_swearsNames[1])) != -1 ){ 
		//new len = g_swearsNames[0] 
		//while(len--)
		//szSaid[pos++] = '   '
		client_print ( id , print_chat , "Atentie ce vorbesti ! Mesajul a fost blocat !" );
		found = true 
		continue
	}
	++i
	}
	if ( found ){ 
		new cmd[32]
		read_argv(0,cmd,31)          
		engclient_cmd(id,cmd,szSaid)    
	}
	return PLUGIN_CONTINUE 
}
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
* Inactiv momentan.
#Vali
Fost moderator
Fost moderator
Posts: 2624
Joined: 24 Jan 2012, 11:00
Detinator Steam: Da
SteamID: id/spryt3
Reputatie: Fost Moderator
Fost Scripter eXtreamCS.com
1.2 / 3
Location: root
Has thanked: 81 times
Been thanked: 149 times
Contact:

05 Jul 2014, 22:02

| Afiseaza codul
#include <amxmodx>
#include <amxmisc> 

// max number of words in word list 
#define MAX_WORDS 192 

new g_swearsNames[MAX_WORDS][32] 
new g_swearsNum 

public plugin_init() 
{ 
	register_plugin("Swear Filter","1.0a","SuicideDog") 
	register_clcmd("say","swearcheck") 
	register_clcmd("say_team","swearcheck")
	readList()
}

readList() 
{ 
    // file to read words from 
	new szCustomDir[64]
	new filename[64]
	get_customdir( szCustomDir, 63 )
	format(filename, 63, "%s/swear/swearwords.ini", szCustomDir )

	if(!file_exists(filename) ){
		log_message("Swear Filter: file %s not found", filename) 
		return 
	} 
	new iLen 
	while( g_swearsNum < MAX_WORDS && read_file(filename, g_swearsNum ,g_swearsNames[g_swearsNum][1],30,iLen) ) 
	{ 
	if( g_swearsNames[g_swearsNum][0] == ';') continue
	g_swearsNames[g_swearsNum][0] = iLen 
	++g_swearsNum 
	}
	log_message("Swear Filter: loaded %d words",g_swearsNum ) 
} 

public swearcheck(id) 
{
	new szSaid[192]
	read_args(szSaid,191)
	new bool:found = false
	new pos, i = 0
	while ( i < g_swearsNum )
	{
	if ( (pos = containi(szSaid,g_swearsNames[1])) != -1 ){ 
		new len = g_swearsNames[0] 
		while(len--)
		szSaid[pos++] = '*'
		found = true 
		continue
	}
	++i
	}
	if ( found ){ 
		client_print(id,print_chat,"dsada")
	}
	return PLUGIN_CONTINUE 
}
mr.f3lyx
Membru, skill +2
Membru, skill +2
Posts: 624
Joined: 10 Nov 2013, 20:24
Detinator Steam: Da
Location: Palermo, Italy
Has thanked: 69 times
Been thanked: 18 times
Contact:

15 Jul 2014, 18:07

mda nu merge
User avatar
cyby
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 1939
Joined: 16 Jul 2011, 20:46
Detinator Steam: Da
Detinator server CS: Da
Reputatie: Scripter eXtreamCS
Fost Moderator ajutator
Location: Bacău
Has thanked: 227 times
Been thanked: 471 times
Contact:

15 Jul 2014, 23:00

testeaza | Afiseaza codul
#include <amxmodx>
#include <amxmisc> 

// max number of words in word list 
#define MAX_WORDS 192 

new const TAG[] = "[TAG]";

new g_swearsNames[MAX_WORDS][32] 
new g_swearsNum, g_msg_saytext;

public plugin_init() 
{ 
	register_plugin("Swear Filter","1.0a","SuicideDog") 
	register_clcmd("say","swearcheck") 
	register_clcmd("say_team","swearcheck")
	g_msg_saytext = get_user_msgid("SayText")
	readList()
}

readList() 
{ 
    // file to read words from 
	new szCustomDir[64]
	new filename[64]
	get_customdir( szCustomDir, 63 )
	format(filename, 63, "%s/swear/swearwords.ini", szCustomDir )

	if(!file_exists(filename) ){
		log_message("Swear Filter: file %s not found", filename) 
		return 
	} 
	new iLen 
	while( g_swearsNum < MAX_WORDS && read_file(filename, g_swearsNum ,g_swearsNames[g_swearsNum][1],30,iLen) ) 
	{ 
	if( g_swearsNames[g_swearsNum][0] == ';') continue
	g_swearsNames[g_swearsNum][0] = iLen 
	++g_swearsNum 
	}
	log_message("Swear Filter: loaded %d words",g_swearsNum ) 
} 

public swearcheck(id) 
{
	new szSaid[192]
	read_args(szSaid,191)
	new bool:found = false
	for(new i = 0; i < g_swearsNum; i++)
	{
		if(containi(szSaid, g_swearsNames[1]))
		{
			found = true 
			continue;
		}
	}
	if(found)
	{
		color(id, ".v%s.g Atentie ce vorbesti! Mesajul a fost blocat!", TAG)
		return PLUGIN_HANDLED
	}
	return PLUGIN_CONTINUE 
}

stock color(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, ".v", "^4")
	replace_all(msg, 190, ".g", "^1")
	replace_all(msg, 190, ".e", "^3")
	
	if (id) players[0] = id;
	else get_players(players, count, "ch")
	{
		for (new i = 0; i < count; i++)
		{
			if (is_user_connected(players))
			{
				message_begin(MSG_ONE_UNRELIABLE, g_msg_saytext, _, players)
				write_byte(players)
				write_string(msg)
				message_end()
			}
		}
	}
}
Image
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests