Hi,
as the title says, is there a way to do so?
Thanks in advance
How to block the 'Fire in the hole.' sound in CSS?
Yes, there's a way. I believe this is done by hooking SendUserMessage. There was a talk on that recently in a thread right below yours http://forums.sourcepython.com/showthread.php?1138-Modifying-chat-with-sayfilter-but-SayCommand-doesnt-quot-register-quot&p=7381&viewfull=1#post7381
/id/its_iPlayer
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam
Hail, Companion. [...] Hands to yourself, sneak thief.
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam
Hail, Companion. [...] Hands to yourself, sneak thief.
The user message you would want to hook is RadioText. However, there is a function called UTIL_CSRadioMessage() which is used by the engine to create the user message. So, you can simply hook this function instead:
Syntax: Select all
from core import PLATFORM
import memory
from memory import Convention
from memory import DataType
from memory.hooks import PreHook
server = memory.find_binary('server')
# UTIL_CSRadioMessage(IRecipientFilter &, int, int, char const*, char const*, char const*, char const*, char const*)
if PLATFORM == 'windows':
identifier = b'\x55\x8B\xEC\x68\x2A\x2A\x2A\x2A\x8B\x45\x08'
else:
identifier = '_Z19UTIL_CSRadioMessageR16IRecipientFilteriiPKcS2_S2_S2_S2_'
UTIL_CSRadioMessage = server[identifier].make_function(
Convention.CDECL,
[DataType.POINTER, DataType.INT, DataType.INT, DataType.STRING, DataType.STRING, DataType.STRING, DataType.STRING, DataType.STRING],
DataType.VOID
)
@PreHook(UTIL_CSRadioMessage)
def pre_radio_message(args):
if args[6] == '#Cstrike_TitlesTXT_Fire_in_the_hole':
return False
Well, he asked for the sound not the message. I thought they added a convar for that (at least the message), but I can't seem to find it on my phone.
*Edit: found it, it's sv_ignoregrenaderadio
I remembered I created an ES addon for it: http://addons.eventscripts.com/addons/view/LooneyGrenades
*Edit: found it, it's sv_ignoregrenaderadio
I remembered I created an ES addon for it: http://addons.eventscripts.com/addons/view/LooneyGrenades
My fault
/id/its_iPlayer
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam
Hail, Companion. [...] Hands to yourself, sneak thief.
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam
Hail, Companion. [...] Hands to yourself, sneak thief.
Radio commands are console commands after all, you can always block them with @commands.client.ClientCommandFilter (would also block the message tho, but you can make a custom SayText for that).
I'm not sure what the exact command for "Fire in the hole" is, but you can simply find it out by printing the currently executed command.
I'm not sure what the exact command for "Fire in the hole" is, but you can simply find it out by printing the currently executed command.
satoon101 wrote:Well, he asked for the sound not the message. I thought they added a convar for that (at least the message), but I can't seem to find it on my phone.
*Edit: found it, it's sv_ignoregrenaderadio
I remembered I created an ES addon for it: http://addons.eventscripts.com/addons/view/LooneyGrenades
Awesome thank you all! I'll test it as soon as I can
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 45 guests