AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Message (https://forums.alliedmods.net/showthread.php?t=213946)

DWIGHTpN 04-21-2013 06:26

Message
 
Hi.
How to use macro (message_const.ini).
I need SVC_PRINT.

Quote:

register_message(SVC_PRINT,"hook_ConPrint");
hook:
Quote:

public hook_ConPrint()
{
new x[100];
get_msg_arg_string(1,x,100);
log_to_file("file.log","%s",x);
return PLUGIN_CONTINUE;
}
it is right or not?

Blizzard_87 04-21-2013 07:29

Re: Message
 
new x[100];
get_msg_arg_string(1,x,100);

=>

new x[101];
get_msg_arg_string(1,x,100);

DWIGHTpN 04-21-2013 08:09

Re: Message
 
Ok, but file.log is not created. (so hook not work).
I want to write in file.log, all console notifity and print...

ConnorMcLeod 04-21-2013 10:18

Re: Message
 
SVC_ messages are sent from engine, excepted few ones as SVC_TEMPENTITY, SVC_DIRECTOR.
You can hook them with default amxx.
You can hook with default amxx what is sent from dll to engine, because metamod is between them.

To hook this, you need a module such as orpheu or rage.

DWIGHTpN 04-21-2013 13:35

Re: Message
 
I understand Connor.
Need to create a cpp , very well.
Thanks :).
Please T/C.


All times are GMT -4. The time now is 10:48.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.