Raised This Month: $32 Target: $400
 8% 

Death Message Block


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands        Approver:   v3x (159)
Jordan44053
Junior Member
Join Date: Aug 2005
Old 07-08-2006 , 18:57   Death Message Block
Reply With Quote #1

Death Message Block

Purpose
There are a large variety of death message blocks available, but all of them* use the set_msg_block native, which is unreliable and easily bypassed. Even a simple stock such as user_silentkill will turn off such a death message block.

This plug-in, however, instead registers the message and blocks them as they are called. Since it doesn't use set_msg_block, the only way to deactivate the death message block is to alter the cvar (mp_deathblock) or to pause the plug-in.

* As far as I know.

Instructions
All interaction with the plug-in is done through Cvars.

Generic Cvars (All Mods):
mp_deathblock - Turns the death message block on or off. Greater than zero is on, zero or less is off.

The Specialists Cvars:
mp_tsmessageblock - Blocks certain TSMessages. This removes the messages such as "2 frags for Jordan44053, Kung-Fu style!" but doesn't effect "Press Fire To Play!" or the countdown to that.


This plug-in has only been tested in The Specialists but should work with all mods.

Update 1.1
Engine include removed as it is not needed.

Update 1.2
Engine is included in 1.71 and below, but not in 1.75 or higher as it was moved to amxmodx.inc in 1.75. This should be it for the updates.
Attached Files
File Type: sma Get Plugin or Get Source (deathmsgblock.sma - 2284 views - 1.2 KB)
__________________

Last edited by Jordan44053; 07-09-2006 at 00:55.
Jordan44053 is offline
Shurik3n
Member
Join Date: Feb 2006
Old 07-08-2006 , 19:07   Re: Death Message Block
Reply With Quote #2

Nice plugin, I have used Avalanche's death message blocker but it stop blocking if user_silentkill is called. This will be good for TSRP servers that have cyanide or whatever and want to use a death message blocker.
Shurik3n is offline
Throstur
Senior Member
Join Date: Nov 2004
Location: Iceland
Old 07-13-2006 , 12:56   Re: Death Message Block
Reply With Quote #3

How about a description of what the plugin has as an effect on the game?
__________________
Throstur is offline
Send a message via AIM to Throstur Send a message via MSN to Throstur
Jordan44053
Junior Member
Join Date: Aug 2005
Old 07-13-2006 , 23:02   Re: Death Message Block
Reply With Quote #4

A death message is the text/image that appears in the top right corner when you kill someone. This hides that very reliably, and if you're running The Specialists and the Cvar is enabled, it also hides TSMessages (2 frags for <player>, Kung-Fu Style!), but doesn't hide the countdown to spawn in TS.
__________________
Jordan44053 is offline
Xerxes
Member
Join Date: Jun 2005
Old 08-07-2006 , 09:28   Re: Death Message Block
Reply With Quote #5

Just a suggestion if you want to, let the admins see the kills incase it's not already in there.
Xerxes is offline
Cuttlas
Senior Member
Join Date: Jan 2015
Old 11-26-2023 , 15:46   Re: Death Message Block
Reply With Quote #6

how to only show admins and maybe VIP death/kill messages?

I do not know how to get killed or the attacker's ID via message(msg_id,msg_dest,msg_entity), so I can put a if condition there
__________________
To Infinity n Beyond
Cuttlas is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 11-26-2023 , 20:56   Re: Death Message Block
Reply With Quote #7

@Cuttlas msg_entity is the player id
__________________
mlibre is offline
Cuttlas
Senior Member
Join Date: Jan 2015
Old 11-27-2023 , 04:29   Re: Death Message Block
Reply With Quote #8

PHP Code:
    new szName[32]; 
    
get_user_name(msg_entityszNamecharsmax(szName))
    
client_print(0print_chat"%s is dead"msg_entity
I have used this to test, but it only print " is dead", the name is empty here.

also:

PHP Code:
    if (is_user_bot(msg_entity))
        
client_print(0print_chat"A bot is killed"
not working, it seems msg_entity is not the user id, or something related to.
__________________
To Infinity n Beyond
Cuttlas is offline
Cuttlas
Senior Member
Join Date: Jan 2015
Old 11-27-2023 , 15:56   Re: Death Message Block
Reply With Quote #9

for those who are interested:

PHP Code:
public deathmessage(msg_id,msg_dest,msg_entity) {
     new 
iAttacker get_msg_arg_int(1)
     new 
iVictim get_msg_arg_int(2)

I have found it here: https://forums.alliedmods.net/showthread.php?t=279758
__________________
To Infinity n Beyond

Last edited by Cuttlas; 11-27-2023 at 15:58.
Cuttlas is offline
Reply


Thread Tools
Display Modes

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:46.


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