55 |
* or fully block it. Here is how it works: |
* or fully block it. Here is how it works: |
56 |
* If you hook a message, the message is stored but not sent. You have the opportunity to |
* If you hook a message, the message is stored but not sent. You have the opportunity to |
57 |
* not only execute code, but to get/set the contents of the message, before you choose to |
* not only execute code, but to get/set the contents of the message, before you choose to |
58 |
* either block it or let it go on its way. The hooked function will be passed a msg_id, msg_dest, and entity index. */ |
* either block it or let it go on its way. The hooked function will be passed a msg_id, msg_dest, and entity index. |
59 |
|
* The return value can be passed to unregister_message() to stop the message from being hooked */ |
60 |
native register_message(iMsgId, const szFunction[]); |
native register_message(iMsgId, const szFunction[]); |
61 |
|
|
62 |
|
/* Unregisters a message hook previously created with register_message |
63 |
|
* You must pass the proper message id, and return value from the message to unregister the message successfully. */ |
64 |
|
native unregister_message(iMsgId, registeredmsg); |
65 |
|
|
66 |
|
|
67 |
/* The get/set _msg commands will fail if used outside a hooked message scope. |
/* The get/set _msg commands will fail if used outside a hooked message scope. |
68 |
* They should never be used unless inside a registered message function. |
* They should never be used unless inside a registered message function. |
69 |
* There are eight different ways of sending a message, five are ints, two are floats, and one is string. |
* There are eight different ways of sending a message, five are ints, two are floats, and one is string. |