AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   block log messages... (https://forums.alliedmods.net/showthread.php?t=2321)

jtp10181 06-01-2004 18:44

block log messages...
 
Not sure how to block log messages from the engine. I know howto do death and score messages, but not log.

Looking in some logs fomr the laser plugin and noticed this for every kill....

Code:

L 05/21/2004 - 21:09:48: "[POD]ffmcobalt (5)<57><0><TERRORIST>" committed suicide with "world"
L 05/21/2004 - 21:09:48: "jtp10181<62><STEAM_0:1:19753><CT>" killed "[POD]ffmcobalt (5)<57><BOT><TERRORIST>" with "lasergun"

I will screw up the web stats because people will be a negative bonus for the suicide. Just need to block the HLDS log message so it will only use mine.

ts2do 06-02-2004 22:54

gimme the link the the lazergun plugin and Ill fix it up for u

jtp10181 06-02-2004 23:57

I don't need it to be "fixed" I just need to know how to block the log messages.

Its in the plugins forums, I posted it a while ago.

like how you do this for death messages

Code:

get_user_msgid("DeathMsg")
I just need to know the msgid to pass to get the info for when hlds writes to the log, so i can block the message logging for the kills in this plugin.

Or if there is some other way to do this.

BTW if you have any suggestions for the plugin you can tell me, I am a very competent coder so I don't really need anyone to "fix" it for me, unless you see an obvious problem?

BAILOPAN 06-03-2004 01:54

Unfortunately, it's not possible to supercede log messages in AMXx 0.16 because it hooks the POST call in Metamod.

If you want, we could change it so you can block log messages in the plugin_log() forward.

jtp10181 06-03-2004 09:28

yeah anyway to block the suicide logging when using the user_kill would be nice.

Right now I have this

Code:

                set_msg_block(gmsgDeathMsg,BLOCK_ONCE)
                set_msg_block(gmsgScoreInfo,BLOCK_ONCE)
                user_kill(id,1)

But it still logs it as a suicude death AND then the plugin also logs it correctly so I imagine it would have some weird side effects on stats software.

ts2do 06-03-2004 12:46

set the user deadflag to 1 and the user hp to 0 and all the spec stuff

BAILOPAN 06-03-2004 13:58

ok, jtp: I will make the log supercede-able for 0.20
Then you can just set a global "user has suicided flag", catch the log event in plugin_log(), and return PLUGIN_HANDLED instead of PLUGIN_CONTINUE (and toggle the flag again).

jtp10181 06-03-2004 16:56

Quote:

Originally Posted by ts2do
set the user deadflag to 1 and the user hp to 0 and all the spec stuff

.... does that make sense to anyone?

Quote:

ok, jtp: I will make the log supercede-able for 0.20
Then you can just set a global "user has suicided flag", catch the log event in plugin_log(), and return PLUGIN_HANDLED instead of PLUGIN_CONTINUE (and toggle the flag again).
oook.... when the time come you will have to give me a little example. I don't want to block all the logging from the plugin, just all the suicides caused by it.


All times are GMT -4. The time now is 14:52.

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