Raised This Month: $ Target: $400
 0% 

Help Changing this part of swear filter plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Flashhh!
Senior Member
Join Date: Nov 2005
Old 03-18-2006 , 01:01   Help Changing this part of swear filter plugin
Reply With Quote #1

Hello I need to change this part of this swear filter. I only need to reaplace the '*' that appear when the bad word was type by only a "good word" instead the *.

Part of original code is:


Code:
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[i][1])) != -1 ){ 
		new len = g_swearsNames[i][0] 
		while(len--)
		szSaid[pos++] = '*' // I think this part must be change!
		found = true 
		continue
	}
	++i
	}
	if ( found ){ 
		new cmd[32]
		read_argv(0,cmd,31)          
		engclient_cmd(id,cmd,szSaid)    
	}
	return PLUGIN_CONTINUE 
}
Modify code (dont work):

Code:
{
	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[i][1])) != -1 ){ 
		new len = g_swearsNames[i][0] 
		while(len--)
		szSaid[pos++] = client_print ("good word")
 		found = true 
		continue
	}
	++i
	}
	if ( found ){ 
		new cmd[32]
		read_argv(0,cmd,31)          
		engclient_cmd(id,cmd,szSaid)    
	}
	return PLUGIN_CONTINUE 
}
Which is the comand I must put in this line if I want to replace the * by only one word:
Code:
szSaid[pos++] = '*'
Flashhh! is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode