AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   Machina "Sound" Block [Solved] (https://forums.alliedmods.net/showthread.php?t=181257)

ReFlexPoison 03-27-2012 01:58

Machina "Sound" Block [Solved]
 
This has been brought to my attention several times, but never felt like asking the forums. I see people using plugins to completely disable the Machina, and I also see people using TF2Items to change the gun. (Couldn't figure out the config) So really, what I'm curious about is if there is a way to disable the sound of the Machina on the server (so you don't have to hear constant collateral sounds from the bots being shot).

If the sound isn't possible, how do you use TF2Items to change the gun players use even if Machina is chosen in their inventory?

Ty in advance...

11530 03-27-2012 12:22

Re: Machina "Sound" Block.. or alternative?
 
I don't think it's possible to change the sound since sound files are handled client-side, your best bet is either to change it for the stock sniper rifle, however I'm not sure how you'd go about doing this with TF2Items.

Another option would be to maybe use SDKHooks to detect the penetration-kill then block it entirely.

Drixevel 03-27-2012 12:39

Re: Machina "Sound" Block.. or alternative?
 
https://forums.alliedmods.net/showpo...73&postcount=7

^ MAY stop sounds, as later posts say, may not work.

https://forums.alliedmods.net/showpo...59&postcount=1

^Blocks the damn thing entirely.

You should search a bit to find this kind of thing.

ReFlexPoison 03-27-2012 13:04

Re: Machina "Sound" Block.. or alternative?
 
Quote:

Originally Posted by r3dw3r3w0lf (Post 1676788)
https://forums.alliedmods.net/showpo...73&postcount=7

^ MAY stop sounds, as later posts say, may not work.

https://forums.alliedmods.net/showpo...59&postcount=1

^Blocks the damn thing entirely.

You should search a bit to find this kind of thing.

I searched, and I've, believe me or not, used both of them. The Machina block plugin is a bit dirty, telling the user to change weapons while there is nothing in their hand. The sound remove plugin you also linked doesn't work, at least not for me.

Currently I am using the Machina block with a bit of an edited script, but still doesn't cut out to be my favorite resolve.

napalm00 03-27-2012 13:14

Re: Machina "Sound" Block.. or alternative?
 
Change the "playerpenetratecount" int of all player_deaths triggered by a machina to 0 (ofc using the pre hook mode)? Dunno, just tossing ideas :P

ReFlexPoison 03-27-2012 13:18

Re: Machina "Sound" Block.. or alternative?
 
Quote:

Originally Posted by napalm00 (Post 1676824)
Change the "playerpenetratecount" int of all player_deaths triggered by a machina to 0 (ofc using the pre hook mode)? Dunno, just tossing ideas :P

May I ask how I would do this, because, wouldn't doing that cause the Machina to do absolutely nothing in damage? I mean, if I could figure out how to get the TF2Items to switch all Machinas to regular Snipers, that would probably do best. All in all, anything would work. (TF2Items is also simpler than scripting in my opinion :wink:)

napalm00 03-27-2012 13:27

Re: Machina "Sound" Block.. or alternative?
 
It would most likely leave the damage untouched, but before setting it to anything you'd have to debug the player_death event of a machina penetration kill.
About TF2Items, I thought you wanted to only block the sound, not the penetration attribute or the weapon itself :o

EDIT:
Just fyi, it's not possible to replace weapons by using only the tf2items.weapons.txt file.

ReFlexPoison 03-27-2012 13:58

Re: Machina "Sound" Block.. or alternative?
 
Quote:

Originally Posted by napalm00 (Post 1676833)
It would most likely leave the damage untouched, but before setting it to anything you'd have to debug the player_death event of a machina penetration kill.
About TF2Items, I thought you wanted to only block the sound, not the penetration attribute or the weapon itself :o

EDIT:
Just fyi, it's not possible to replace weapons by using only the tf2items.weapons.txt file.

Yeah, what I'm aiming for, but, like I said, I have VERY minimal scripting knowledge. Anyway thank you for the info though. I'll probably end up figuring something out with this.

And if I am going to use TF2Items, it will probably end up being TF2 Give Weapon. (Still don't know if "that" is possible, but I just posted in the forum thread.

Dr. McKay 03-27-2012 22:19

Re: Machina "Sound" Block.. or alternative?
 
I'm pretty sure this has been asked many times before, but I can't find any similar threads atm.

Anyway, this is completely possible with a plugin. It's not client-side.

I don't feel like writing and testing code right now, so try hooking teamplay_broadcast_audio or something like that.

Check out this similar plugin: https://forums.alliedmods.net/showthread.php?t=167713

ReFlexPoison 03-27-2012 22:49

Re: Machina "Sound" Block.. or alternative?
 
Quote:

Originally Posted by Dr. McKay (Post 1677126)
I'm pretty sure this has been asked many times before, but I can't find any similar threads atm.

Anyway, this is completely possible with a plugin. It's not client-side.

I don't feel like writing and testing code right now, so try hooking teamplay_broadcast_audio or something like that.

Check out this similar plugin: https://forums.alliedmods.net/showthread.php?t=167713

I wouldn't know how to script it =/ nor will I ask you to script it for me. I'll attempt to figure it out though. Ty for the info.


All times are GMT -4. The time now is 09:43.

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