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

CS 1.6 Block DeathMsg


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shyloo
Member
Join Date: Jan 2022
Old 01-28-2022 , 12:22   CS 1.6 Block DeathMsg
Reply With Quote #1

Hello again , i'm looking for a plugin that block deathmsg when the T kill CT , that make him unknown killer, for example if an T kill CT in the top right the deathmsg won't be displayed
Shyloo is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 01-28-2022 , 15:07   Re: CS 1.6 Block DeathMsg
Reply With Quote #2

Code:
#include <amxmodx>


public plugin_init()
{
	register_plugin("plugin", "version", "author")

	register_message(get_user_msgid("DeathMsg"), "OnDeathMsg")
}

public OnDeathMsg(msgId, msgDest, msgEnt)
{
	new killer = get_msg_arg_int(1)
	new victim = get_msg_arg_int(2)

	if (is_user_connected(killer) && get_user_team(killer) == 1 && get_user_team(victim) == 2)
	{
		return PLUGIN_HANDLED
	}

	return PLUGIN_CONTINUE
}
__________________









Last edited by CrazY.; 01-28-2022 at 15:08.
CrazY. is offline
Shyloo
Member
Join Date: Jan 2022
Old 01-28-2022 , 16:05   Re: CS 1.6 Block DeathMsg
Reply With Quote #3

Quote:
Originally Posted by CrazY. View Post
Code:
#include <amxmodx>


public plugin_init()
{
	register_plugin("plugin", "version", "author")

	register_message(get_user_msgid("DeathMsg"), "OnDeathMsg")
}

public OnDeathMsg(msgId, msgDest, msgEnt)
{
	new killer = get_msg_arg_int(1)
	new victim = get_msg_arg_int(2)

	if (is_user_connected(killer) && get_user_team(killer) == 1 && get_user_team(victim) == 2)
	{
		return PLUGIN_HANDLED
	}

	return PLUGIN_CONTINUE
}
It's still the same , when the T kill CT , the deathmsg on top right screen display normaly and it shows that the T has killed CT with that weapon
Shyloo is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 01-28-2022 , 17:48   Re: CS 1.6 Block DeathMsg
Reply With Quote #4

Not sure, tested on a local server with bots, working here. You may have a plugin that is generating the DeathMsg. Try it but with all the other plugins disabled.

__________________








CrazY. is offline
Shyloo
Member
Join Date: Jan 2022
Old 01-28-2022 , 17:54   Re: CS 1.6 Block DeathMsg
Reply With Quote #5

Yeah it's working perfectly fine , thanks again , i have another question , can you make it it display the name of the CT and the weapon ? , for example if the T kill an CT it only display the weapon and CT's name , from this : T's name AK47 CT's name , to this : AK47 CT's name
Shyloo is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 01-29-2022 , 07:53   Re: CS 1.6 Block DeathMsg
Reply With Quote #6

This seems to be working

Code:
#include <amxmodx>


public plugin_init()
{
	register_plugin("plugin", "version", "author")

	register_message(get_user_msgid("DeathMsg"), "OnDeathMsg")
}

public OnDeathMsg(msgId, msgDest, msgEnt)
{
	new killer = get_msg_arg_int(1)
	new victim = get_msg_arg_int(2)

	if (is_user_connected(killer) && get_user_team(killer) == 1 && get_user_team(victim) == 2)
	{
		set_msg_arg_int(1, ARG_BYTE, 0)
	}

	return PLUGIN_CONTINUE
}
__________________








CrazY. is offline
Shyloo
Member
Join Date: Jan 2022
Old 01-29-2022 , 14:56   Re: CS 1.6 Block DeathMsg
Reply With Quote #7

Thank you ! , it's working so perfectly .
Shyloo 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:50.


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