Raised This Month: $ Target: $400
 0% 

Module: MSGHelper


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jim_yang
Veteran Member
Join Date: Aug 2006
Old 05-14-2008 , 08:15   Module: MSGHelper
Reply With Quote #1

Module Version of "Message Logging"
It will log HL and mod messages to addons\amxx\logs\msghelper.log

Install:
Put module in amxx\modules\
write msghelper in amxx\configs\modules.ini

commands:
msghelper - Show all commands and cvars of this module
msglog_start <all or msgid or msgname> - Starts logging all or given messages
msglog_stop <all or msgid or msgname> - Stops logging all or given messages
msglog_list - List all hooked messages.

cvars:
msglog_dest_filter - Allows for filtering messages by message destination
--- 0: MSG_BROADCAST
--- 1: MSG_ONE
--- 2: MSG_ALL
--- 3: MSG_INIT
--- 4: MSG_PVS
--- 5: MSG_PAS
--- 6: MSG_PVS_R
--- 7: MSG_PAS_R
--- 8: MSG_ONE_UNRELIABLE
--- 9: MSG_SPEC
--- 10: All (Default)
msglog_entity_filter - Allows for filtering messages by entity index(Default is 0)

example logged message:
Code:
message_begin(MSG_ONE, get_user_msgid("ScreenFade"), _, 1) //classname: "player" netname: ".:|:."
write_short(4) //1
write_short(0) //2
write_short(0) //3
write_byte(0) //4
write_byte(0) //5
write_byte(0) //6
write_byte(0) //7
message_end()
Attached Files
File Type: zip msghelper_amxx.zip (87.5 KB, 237 views)
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>

Last edited by jim_yang; 02-09-2009 at 21:25. Reason: fix write_char bug.should be finals for such simple thing.
jim_yang is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 05-14-2008 , 13:55   Re: Module: MSGHelper
Reply With Quote #2

Hmm, nice...also entity filter. Gj
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-14-2008 , 15:27   Re: Module: MSGHelper
Reply With Quote #3

If you start message logging, will they continue after map change?
Or, will you have to add the commands to the amxx.cfg ?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 05-14-2008 , 21:01   Re: Module: MSGHelper
Reply With Quote #4

yes, it will continue logging after map change
so you can capture the message right after server init.
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 02-09-2009 , 21:27   Re: Module: MSGHelper
Reply With Quote #5

update
change post hook to pre hook
find a weird log result when using post hook for CuwWeapon when cl_lw 0
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 02-10-2009 , 19:51   Re: Module: MSGHelper
Reply With Quote #6

Can you elaborate on the descriptions for the destinations? Maybe give examples?

Specifically, I'd like to know about MSG_INIT, MSG_PVS, and MSG_PAS.

message_const.inc
Code:
#define MSG_BROADCAST               0        // Unreliable to all
#define MSG_ONE                     1        // Reliable to one (msg_entity)
#define MSG_ALL                     2        // Reliable to all
#define MSG_INIT                    3        // Write to the init string
#define MSG_PVS                     4        // Ents in PVS of org
#define MSG_PAS                     5        // Ents in PAS of org
#define MSG_PVS_R                   6        // Reliable to PVS
#define MSG_PAS_R                   7        // Reliable to PAS
#define MSG_ONE_UNRELIABLE          8        // Send to one client, but don't put in reliable stream, put in unreliable datagram (could be dropped)
#define MSG_SPEC                    9        // Sends to all spectator proxies
Good work, btw
__________________
stupok is offline
steve139
Senior Member
Join Date: May 2007
Location: here
Old 02-12-2009 , 11:42   Re: Module: MSGHelper
Reply With Quote #7

very nice


Good job !


can you compile this for linux, please ?
steve139 is offline
Dr.G
Senior Member
Join Date: Nov 2008
Old 03-09-2009 , 17:33   Re: Module: MSGHelper
Reply With Quote #8

hum i dont get any log file and my server is die after logging like 1 min
__________________
Dr.G is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:53.


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