Raised This Month: $51 Target: $400
 12% 

blocking message to hl log file


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
diamond-optic
Veteran Member
Join Date: May 2005
Old 08-03-2006 , 20:39   blocking message to hl log file
Reply With Quote #1

im using an entity i created (throwing rocks) to do dmg and eventually kill clients..
this is how im doing it as of now:
Code:
            set_msg_block(get_user_msgid("DeathMsg"), BLOCK_ONCE)             user_kill(object, 1)                                     message_begin(MSG_ALL, get_user_msgid("DeathMsg"), {0, 0, 0}, 0)             write_byte(owner)             write_byte(object)             write_byte(0)             message_end()                                     dod_set_pl_deaths(object, get_user_deaths(object) + 1)             dod_set_user_kills(owner, get_user_frags(owner) + 1)

the problem im having right now is the user_kill, it creates a suicide log message.. now it probably isnt a big big deal.. but unless im wrong.. wouldnt things like psychostats pick that up as the player killing themself? and i dont want to give ppl suicides when thats not what really happened..

anyway to catch this log message and stop it from actually going to the logs? or is there a better way to do this...

also why isnt there a set_deaths native that isnt mod-specfic.. its the only thing making the plugin dod specific becuase i dont want to be bothered with adding extra stuff to cover both dod & cstrike..
__________________

Last edited by diamond-optic; 08-03-2006 at 20:43.
diamond-optic is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 08-03-2006 , 23:48   Re: blocking message to hl log file
Reply With Quote #2

there is a plugin called "vehiclekills" that blocks suicide log messages
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 08-04-2006 , 01:05   Re: blocking message to hl log file
Reply With Quote #3

The vehiclekill plugin only blocks vechilekills suicides. The code below will block message out of the hl logs. I have taken DS method into what diamond-optic wants.

Code:
#include <amxmodx> #include <fakemeta> new bool:kill[33]; new DeathMsg; public plugin_init() {     register_clcmd("say /slay", "cmdSlay");     register_forward(FM_AlertMessage, "fm_AlertMessage");     DeathMsg = get_user_msgid("DeathMsg") } public client_connect(id) {     kill[id] = false; } public cmdSlay(id) {     kill[id] = true     set_msg_block(DeathMsg, BLOCK_ONCE)     user_kill(id); } public fm_AlertMessage(at_type, message[]) {     if(at_type == 5) // Filter out some messages.     {         if(containi(message, ">^" committed suicide with ^"world^"") != -1)         {             static dummy[1], userid, index;             parse_loguser(message, dummy, 0, userid);             index =  find_player("k", userid)             if(kill[index])             {                 kill[index] = false;                 return FMRES_SUPERCEDE;             }         }     }     return FMRES_IGNORED; }
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 08-04-2006 , 06:51   Re: blocking message to hl log file
Reply With Quote #4

never said it was a direct copy/paste, just pointing him where to look.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
spq
Junior Member
Join Date: Jul 2006
Location: Germany
Old 08-04-2006 , 07:35   Re: blocking message to hl log file
Reply With Quote #5

my solution for this is to just block all log messages for the user_kill:
Code:
//in plugin_init
register_forward(FM_AlertMessage, "log_block")
//where you need the user_kill(or anything which generates false logs)
set_log_block(true)
user_kill(player)
set_log_block(false)
//anywhere
new bool:log_block_state = false
set_log_block(bool:value)
 log_block_state = value
public log_block(type, msg[])
 return(log_block_state?FMRES_SUPERCEDE:FMRES_IGNORED)
spq
spq is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 08-04-2006 , 17:26   Re: blocking message to hl log file
Reply With Quote #6

Actually spq way is the easiest way since you know when your going to kill the person after thinking about it for awhile. Checking for the actually player isn't really need.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
diamond-optic
Veteran Member
Join Date: May 2005
Old 08-04-2006 , 23:14   Re: blocking message to hl log file
Reply With Quote #7

sweet thanks guys ill give this a try
__________________
diamond-optic 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 12:21.


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