Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [Script] Hooks.dll
[Script] Hooks.dll [message #369904] Sun, 01 February 2009 10:09 Go to previous message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma:
General (3 Stars)
Please follow instalation instructions carefuly.

I've created a simple dll that contains some of the hooks that I've used.

Simply create 2 new files in your project and add the following code.

"Hooks.h"
Toggle Spoiler




"Hooks.cpp"
Toggle Spoiler



Make sure you call
Load_Hooks();





Make sure you load the file attached into the server before you call Load_Hooks.
If you use SSGM, just load it as a plugin in the 01 slot.


Here is a sample SSGM plugin "plugin.cpp" file that uses this:

Toggle Spoiler




Some of the hook functions allow you to return a bool. For example, the chat hook. If you return 0 you BLOCK the message. With the chat hook, you can also change the message.

bool Chat_Hook(int PlayerID, int Type, WideStringClass &Message, int Target)
{
	Message.Format("Hello world!"); //now everyone will always say "Hello world!"
	return 1;
}








All of these hooks are compatable with RR, scripts and BIATCH as far as I know. If not, give me a shout.


Updated download.
  • Attachment: Hooks.dll
    (Size: 80.00KB, Downloaded 217 times)

[Updated on: Tue, 03 February 2009 00:31]

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
Previous Topic: C&C_Intro
Next Topic: [skins] PT Icons Redone
Goto Forum:
  


Current Time: Thu Nov 21 08:33:07 MST 2024

Total time taken to generate the page: 0.01010 seconds