Posts: 18
Threads: 7
Joined: Feb 2012
Reputation:
0
onSay(string Message, etc.. )
Can I change the value of Message? so when text passed to the game will be different than what is really written?
Posts: 322
Threads: 43
Joined: Mar 2012
Reputation:
-4
public override ChatType OnSay(string Message, ServerClient Client)
{
ServerPrint("Player " + Client.Name + " said " + Message);
return ChatType.ChatContinue;//Send the chat to the next plugin [Eventually to the game]
}
Posts: 18
Threads: 7
Joined: Feb 2012
Reputation:
0
06-29-2012, 18:21
(This post was last modified: 06-29-2012, 18:27 by AboAlwe.)
This code doesn't change the original value of Message. instead, it gives it to you only like in Read-only. I want to change it if possible.
[Edit]
For example: If someone wrote anything like "Hi guys" in the game will show another text that I predefined like "You cannot chat buddy, too bad haha".
I really want it for something else, to replace a list of texts to another for some reason. If it is possible to change the value of Message, that would be great.
Posts: 1,323
Threads: 24
Joined: Nov 2010
Reputation:
91
06-29-2012, 19:51
(This post was last modified: 06-29-2012, 19:51 by zxz0O0.)
Well it's not possible with the current server addon. But it should be possible to add it to the addon. However as you said you can 'fake' it (ServerSay(Client.Name + ": I am an idiot", true);)