ItsMods

Full Version: Client Say
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
i have a question.
Is it possible to somehow make a client say something without him pressing the chat key, typing and sending?
Maybe by manipulating a certain memory address?

The Server catches the sending of a text with chat-say and can even stop sending that (in the OnSay function)... so it should be possible to make a client say something instead of canceling something he says.

I have an idea on a good plugin but to accomplish my idea i need to know if its possible to make a client say something and how to do that.

Hopefully someone can help me with that.
It's even a gsc function http://www.zeroy.com/script/client/sayall.htm so it should be possible
Code:
ServerSay(String.Format("{0}: ^7{1}", ServerClient.Name, "message here"), true);
(08-07-2012, 22:42)Nukem Wrote: [ -> ]
Code:
ServerSay(String.Format("{0}: ^7{1}", ServerClient.Name, "message here"), true);

But that's like.. so ugly...
(08-07-2012, 22:42)Nukem Wrote: [ -> ]
Code:
ServerSay(String.Format("{0}: ^7{1}", ServerClient.Name, "message here"), true);

thx for the answer.
I don't think the "OnSay"-function will catch that message.
I forgot to mention that the "OnSay"-function must be called after making the client say something, so that all plugins can get that fake message in their override OnSay function.

Or would it be possible to just call CPlugin.OnSay so that every plugin (or just the first plugin) gets the message?
@Nukem That's not realistic.
(08-07-2012, 22:51)Deviler86 Wrote: [ -> ]
(08-07-2012, 22:42)Nukem Wrote: [ -> ]
Code:
ServerSay(String.Format("{0}: ^7{1}", ServerClient.Name, "message here"), true);

thx for the answer.
I don't think the "OnSay"-function will catch that message.
I forgot to mention that the "OnSay"-function must be called after making the client say something, so that all plugins can get that fake message in their override OnSay function.

Or would it be possible to just call CPlugin.OnSay so that every plugin (or just the first plugin) gets the message?

If you want that your plugin's OnSay Method is called first, name your plugin something like a.dll
The Addon is calling the Plugins Method in alphabetical order
(08-08-2012, 02:14)Ich1994 Wrote: [ -> ]
(08-07-2012, 22:51)Deviler86 Wrote: [ -> ]
(08-07-2012, 22:42)Nukem Wrote: [ -> ]
Code:
ServerSay(String.Format("{0}: ^7{1}", ServerClient.Name, "message here"), true);

thx for the answer.
I don't think the "OnSay"-function will catch that message.
I forgot to mention that the "OnSay"-function must be called after making the client say something, so that all plugins can get that fake message in their override OnSay function.

Or would it be possible to just call CPlugin.OnSay so that every plugin (or just the first plugin) gets the message?

If you want that your plugin's OnSay Method is called first, name your plugin something like a.dll
The Addon is calling the Plugins Method in alphabetical order

i know that already and i never said that i want my plugin's OnSay to be callled first.
What i want is to do a fake message from a client and that OnSay (for example in PermissionPlugin) is triggered by that.

But thx anyway ^^
You can parse the player's team and use the color code accordingly to help it look more realistic.
Thanks for the suggestion. Added SayAll(ServerClient, Message) and SayTeam(ServerClient, Message).
Pages: 1 2