Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Technical Support » Other » new fds bot, c++ php, perl
Re: new fds bot, c++ php, perl [message #208762 is a reply to message #207285] Tue, 18 July 2006 23:02 Go to previous messageGo to previous message
Cat998
Messages: 1081
Registered: January 2004
Location: Austria, Vienna
Karma:
General (1 Star)
Moderator/Captain

It's pretty easy, just create a function in the form

void Chat(int ID, int Type, const wchar_t *wc_msg) {
}


Then you need to tell the hook, to call your function everytime

someone sends a message with

AddChatHook(Chat);


It's the best when you do this in dllmain.cpp for the beginning (isn't nice, but it does what you want).

you maybe do not want to use widecharacter strings (wchar_t), so

you need to convert it to a normal char* string.

char str[256];
wcstombs(str, wc_msg, 256);

printf("Test: %s\n", str);


When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter then "Yes"

Programming is like sex: one mistake and you have to support it for the rest of your life

Want the best answers? Ask the best questions!

"So long, and thanks for all the fish."

[Updated on: Tue, 18 July 2006 23:03]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Can some1 help me
Next Topic: German Need help
Goto Forum:
  


Current Time: Thu Nov 28 01:50:33 MST 2024

Total time taken to generate the page: 0.01329 seconds