Raised This Month: $12 Target: $400
 3% 

Simple Chat Processor


Post New Thread Reply   
 
Thread Tools Display Modes
Bloodlvst
Senior Member
Join Date: Jul 2007
Old 10-25-2011 , 12:32   Re: Simple Chat Processor
Reply With Quote #21

Quote:
Originally Posted by Antithasys View Post
I accidentally messed up on the spelling of the file. Check this post.
That explains why I sat there for 15 starting at your source code and being all "Well there's no reason this shouldn't be working"
__________________
Quote:
skywalker: I have cs source client 5 how to upgrade to client 7
BAILOPAN: oh
Bloodlvst is offline
Thraka
AlliedModders Donor
Join Date: Aug 2005
Old 10-31-2011 , 19:27   Re: Simple Chat Processor
Reply With Quote #22

Trying to use this for a dynamic !CLASSNAME command. However, I think it's getting called twice on a single chat. I have Simple Colors, and Simple Me installed along with Core.

Code:
public Action:OnChatMessage(&author, Handle:recipients, String:name[], String:message[])
{
	if (TFTeam:GetClientTeam(author) == TFTeam_Spectator)
	{
		new TFClassType:class = CheckChatStringForClass(message)
		switch (class)
		{
			case TFClass_Unknown: return Plugin_Continue;
			default: QueueForClass(author, GetQueueFromTeamClass(TFTeam:GetClientTeam(author), class));
		}
		
		new String:text[200];
		text = "You chose class %i";
		
		new Handle:pack;
		CreateDataTimer(0.001, Timer_MeAction, pack, TIMER_FLAG_NO_MAPCHANGE);
		WritePackCell(pack, author);
		WritePackString(pack, text);
		WritePackCell(pack, _:class);
		
		return Plugin_Stop;
	}
	
	return Plugin_Continue;
}
My data timer gets fired twice. I put that same datatimer in a normal console command and it only fires once.
Thraka is offline
Thraka
AlliedModders Donor
Join Date: Aug 2005
Old 10-31-2011 , 19:51   Re: Simple Chat Processor
Reply With Quote #23

Also, someone may find this handy, maybe you can include it, I don't know. This is a safe chat call you can use in OnChatMessage.

Code:
stock SafePrintToChat(client, const String:format[], any:...)
{
	new String:newString[256];
	new Handle:pack;
	
	VFormat(newString, sizeof(newString), format, 3);
	
	CreateDataTimer(0.001, Timer_SafePrintToChat, pack, TIMER_FLAG_NO_MAPCHANGE);
	WritePackCell(pack, client);
	WritePackString(pack, newString);
}

public Action:Timer_SafePrintToChat(Handle:timer, any:pack)
{
	ResetPack(pack);
	new client = ReadPackCell(pack);
	new String:text[256];
	ReadPackString(pack, text, sizeof(text));

	PrintToChat(client, text);
	
	return Plugin_Stop;
}
Thraka is offline
checkster
BANNED
Join Date: Apr 2007
Location: Norway
Old 12-01-2011 , 05:54   Re: Simple Chat Processor
Reply With Quote #24

PHP Code:
[SM]   [0]  Line 140, /home/groups/alliedmodders/forums/files/3/6/9/5/4/92887.attach::OnPluginStart() 
I get this error, any suggestions ?
l4d2 server.

Solved

Last edited by checkster; 12-01-2011 at 18:48.
checkster is offline
januto
Member
Join Date: Mar 2011
Old 12-13-2011 , 20:22   Re: Simple Chat Processor
Reply With Quote #25

Hi, I have a problem with this plugin:
Quote:
02:16:59 sm plugins reload simple-chatprocessor.smx
02:17:00 L 12/14/2011 - 02:16:57: [simple-chatprocessor.smx] [SCP] Recognized mod [Left 4 Dead 2].
02:17:00 L 12/14/2011 - 02:16:57: [simple-chatprocessor.smx] [SCP] Translation file is not present
02:17:00 L 12/14/2011 - 02:16:57: [SM] Plugin encountered error 25: Call was aborted
02:17:00 L 12/14/2011 - 02:16:57: [SM] Native "SetFailState" reported: Translation file is not present
02:17:00 L 12/14/2011 - 02:16:57: [SM] Displaying call stack trace for plugin "simple-chatprocessor.smx":
02:17:00 L 12/14/2011 - 02:16:57: [SM] [0] Line 140, /home/groups/alliedmodders/forums/files/3/6/9/5/4/92887.attach::OnPluginStart()
02:17:00 [SM] Plugin simple-chatprocessor.smx reloaded successfully.
BUT, I have the
Quote:
scp.l4d2.phrases.txt
on
Quote:
sourcemood/translations
Maybe there's something to do with
Quote:
scp.inc
file? Thx

Edit: Yes, finally works, there was a problem with the translation file name itself, it's explained on past posts
__________________
You are welcome!


Last edited by januto; 12-20-2011 at 05:09. Reason: solution
januto is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 01-08-2012 , 19:33   Re: Simple Chat Processor
Reply With Quote #26

I'm getting the same error message frequently spammed too (TF2 - SM 1.4.0):

Code:
L 01/05/2012 - 01:29:49: SourceMod error session started
L 01/05/2012 - 01:29:49: Info (map "pl_goldrush") (file "errors_20120105.log")
L 01/05/2012 - 01:29:49: [SM] Native "StartMessage" reported: Client 17 is not connected
L 01/05/2012 - 01:29:49: [SM] Displaying call stack trace for plugin "simple-chatprocessor.smx":
L 01/05/2012 - 01:29:49: [SM]   [0]  Line 351, /home/groups/alliedmodders/forums/files/3/6/9/5/4/92887.attach::ResendMessage()
L 01/05/2012 - 01:29:49: [SM] Native "StartMessage" reported: Client 16 is not connected
L 01/05/2012 - 01:29:49: [SM] Displaying call stack trace for plugin "simple-chatprocessor.smx":
L 01/05/2012 - 01:29:49: [SM]   [0]  Line 351, /home/groups/alliedmodders/forums/files/3/6/9/5/4/92887.attach::ResendMessage()
L 01/05/2012 - 01:29:49: [SM] Native "StartMessage" reported: Client 14 is not connected
L 01/05/2012 - 01:29:49: [SM] Displaying call stack trace for plugin "simple-chatprocessor.smx":
L 01/05/2012 - 01:29:49: [SM]   [0]  Line 351, /home/groups/alliedmodders/forums/files/3/6/9/5/4/92887.attach::ResendMessage()
L 01/05/2012 - 01:29:49: [SM] Native "StartMessage" reported: Client 11 is not connected
L 01/05/2012 - 01:29:49: [SM] Displaying call stack trace for plugin "simple-chatprocessor.smx":
L 01/05/2012 - 01:29:49: [SM]   [0]  Line 351, /home/groups/alliedmodders/forums/files/3/6/9/5/4/92887.attach::ResendMessage()
L 01/05/2012 - 01:29:49: [SM] Native "StartMessage" reported: Client 8 is not connected
L 01/05/2012 - 01:29:49: [SM] Displaying call stack trace for plugin "simple-chatprocessor.smx":
L 01/05/2012 - 01:29:49: [SM]   [0]  Line 351, /home/groups/alliedmodders/forums/files/3/6/9/5/4/92887.attach::ResendMessage()
L 01/05/2012 - 01:29:49: [SM] Native "StartMessage" reported: Client 7 is not connected
L 01/05/2012 - 01:29:49: [SM] Displaying call stack trace for plugin "simple-chatprocessor.smx":
L 01/05/2012 - 01:29:49: [SM]   [0]  Line 351, /home/groups/alliedmodders/forums/files/3/6/9/5/4/92887.attach::ResendMessage()
L 01/05/2012 - 01:29:49: [SM] Native "StartMessage" reported: Client 6 is not connected
L 01/05/2012 - 01:29:49: [SM] Displaying call stack trace for plugin "simple-chatprocessor.smx":
L 01/05/2012 - 01:29:49: [SM]   [0]  Line 351, /home/groups/alliedmodders/forums/files/3/6/9/5/4/92887.attach::ResendMessage()
L 01/05/2012 - 01:29:49: [SM] Native "StartMessage" reported: Client 4 is not connected
L 01/05/2012 - 01:29:49: [SM] Displaying call stack trace for plugin "simple-chatprocessor.smx":
L 01/05/2012 - 01:29:49: [SM]   [0]  Line 351, /home/groups/alliedmodders/forums/files/3/6/9/5/4/92887.attach::ResendMessage()
L 01/05/2012 - 02:17:53: [SM] Native "StartMessage" reported: Client 5 is not connected
L 01/05/2012 - 02:17:53: [SM] Displaying call stack trace for plugin "simple-chatprocessor.smx":
L 01/05/2012 - 02:17:53: [SM]   [0]  Line 351, /home/groups/alliedmodders/forums/files/3/6/9/5/4/92887.attach::ResendMessage()
L 01/05/2012 - 02:50:51: Error log file session closed.
11530 is offline
voidborn
SourceMod Donor
Join Date: Apr 2009
Old 01-17-2012 , 22:08   Re: Simple Chat Processor
Reply With Quote #27

Can this by chance be ported to third party mods easily?

How would one go about making a custom translation file for a source mod?
voidborn is offline
loranger
Senior Member
Join Date: Jun 2011
Old 02-07-2012 , 14:33   Re: Simple Chat Processor
Reply With Quote #28

Quote:
Originally Posted by 11530 View Post
I'm getting the same error message frequently spammed too (TF2 - SM 1.4.0):

Code:
L 01/05/2012 - 01:29:49: SourceMod error session started
L 01/05/2012 - 01:29:49: Info (map "pl_goldrush") (file "errors_20120105.log")
L 01/05/2012 - 01:29:49: [SM] Native "StartMessage" reported: Client 17 is not connected
L 01/05/2012 - 01:29:49: [SM] Displaying call stack trace for plugin "simple-chatprocessor.smx":
L 01/05/2012 - 01:29:49: [SM]   [0]  Line 351, /home/groups/alliedmodders/forums/files/3/6/9/5/4/92887.attach::ResendMessage()
L 01/05/2012 - 01:29:49: [SM] Native "StartMessage" reported: Client 16 is not connected
L 01/05/2012 - 01:29:49: [SM] Displaying call stack trace for plugin "simple-chatprocessor.smx":
L 01/05/2012 - 01:29:49: [SM]   [0]  Line 351, /home/groups/alliedmodders/forums/files/3/6/9/5/4/92887.attach::ResendMessage()
L 01/05/2012 - 01:29:49: [SM] Native "StartMessage" reported: Client 14 is not connected
L 01/05/2012 - 01:29:49: [SM] Displaying call stack trace for plugin "simple-chatprocessor.smx":
L 01/05/2012 - 01:29:49: [SM]   [0]  Line 351, /home/groups/alliedmodders/forums/files/3/6/9/5/4/92887.attach::ResendMessage()
L 01/05/2012 - 01:29:49: [SM] Native "StartMessage" reported: Client 11 is not connected
L 01/05/2012 - 01:29:49: [SM] Displaying call stack trace for plugin "simple-chatprocessor.smx":

samhere here but i use a dead player chat: allchat.sm

Last edited by loranger; 02-07-2012 at 14:34.
loranger is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 02-21-2012 , 11:48   Re: Simple Chat Processor
Reply With Quote #29

Four months, and still no sign Antithasys, however I'm sure he has his reasons.

This error everyone talks about is still prevalent in this plugin - maybe it was premature for Anti to approve his own plugin. Are there perhaps any other great programmers who can shed some light on a solution?
11530 is offline
disawar1
AlliedModders Donor
Join Date: Aug 2011
Location: Russian
Old 02-28-2012 , 06:03   Re: Simple Chat Processor
Reply With Quote #30


PHP Code:
GetGameFolderName(sGameDirsizeof(sGameDir));
Format(sTranslationFilesizeof(sTranslationFile), "scp.%s.phrases"sGameDir);
BuildPath(Path_SMsTranslationLocationsizeof(sTranslationLocation), "translations/%s.txt"
And why you call translation files not like called game folder? Of course this causes an error and the plugin does not work. I do not know the name of tf2 game folder rename the files yourself.

Now this plugin is loaded.
Attached Files
File Type: txt scp.left4dead.phrases.txt (752 Bytes, 395 views)
File Type: txt scp.left4dead2.phrases.txt (752 Bytes, 437 views)
__________________

Last edited by disawar1; 02-28-2012 at 08:36. Reason: !
disawar1 is offline
Reply


Thread Tools
Display Modes

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 05:56.


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