• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change [Message] value in OnSay
#1
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?
  Reply
#2
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]
}
  Reply
#3
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.
  Reply
#4
Well that's probably possible to do but seems not what you want. You can realize what you just explained like this
CSHARP Code
  1. public override ChatType OnSay(string Message, ServerClient Client)
  2. {
  3. if(Message=="Hi guys")
  4. {
  5. TellClient(Client.ClientNum, "You cannot chat blabla",true);
  6. return ChatType.ChatNone;
  7. }
  8. else
  9. return ChatType.ChatContinue;
  10. }
[Image: azuw.jpg]
  Reply
#5
So I can't change what is written in chat ( completely or partially ) by some client to something else without using ServerSay or TellClient and show the message as if he said it?
[sorry 2 edits Tongue]
  Reply
#6
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);)
[Image: azuw.jpg]
  Reply
#7
(06-29-2012, 19:51)zxz0O0 Wrote: 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)Wink

lol, this would be very funny xD
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Using Cheat Engine 6.2 to change BO2 address values wzlrsaur 6 7,583 08-06-2013, 06:28
Last Post: 14th
  Mw3 Feed Color Change?? aluzion 5 5,380 07-16-2013, 19:52
Last Post: barata
  Help Spawn Message Playing on Respawn? Killjoy 7 4,735 07-11-2013, 14:53
Last Post: Killjoy
  Change death animation Keouf 3 3,629 07-05-2013, 18:39
Last Post: Nekochan
Question Help change single file lzma maker to multiple in c# raminr63 1 2,724 05-12-2013, 19:31
Last Post: raminr63
Information How to change text messages in MP (.ff edit) giofrida 5 4,346 05-02-2013, 20:05
Last Post: Pozzuh
  [News] Message from Gabe to Steam Community d0h! 8 5,093 04-05-2013, 18:16
Last Post: SuperNovaAO
  Issuer.name into Onsay legitmidget 6 2,459 04-01-2013, 17:51
Last Post: 8q4s8
Its My Birthday! [Release] ServerConfigurator: Change your server settings easily JariZ 39 71,856 03-10-2013, 19:17
Last Post: wisamskay
  i want change mod to .iwd file ABDULMAILK 7 5,292 03-10-2013, 05:24
Last Post: DidUknowiPwn

Forum Jump:


Users browsing this thread: 1 Guest(s)