AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Fix spy broken radio messages (https://forums.alliedmods.net/showthread.php?t=105646)

Flyflo 10-06-2009 19:03

[TF2] Fix spy broken radio messages
 
3 Attachment(s)
Hi !

This is a little plugin that will just resolve the "Spy !" (voicemenu 1 1) radio message broken by plugins which change the colour/alpha of a player skin (FuncommandsX by example).

Without this plugin, after modifying a player's colour and aiming at him, the voicemenu 1 1 command will just results in the generic "Spy" sound of your class.

I tested my plugin the most possible and it should work in every cases but please report any problem you'll find.

Code:

Changelog:

Version 1.1:
- Plugin rewritten to be more efficient and easier to maintain.
Version 1.2:
- Message are now rewritten instead of being suppressed and recreated. (Thanks to MasterOfTheXP).
- Cleaned up the code, mostly to use SM features which weren't available before.
- Removed useless code parts.


Spazman0 10-10-2009 01:24

Re: [TF2] Fix spy broken radio messages
 
Ooooh, looks good. I took a look at the source and looks like it should work, I'll get Arg! to implement this on his server, and then maybe he'll want to talk to you about implementing this in FuncommandsX.

DarthNinja 10-16-2009 01:55

Re: [TF2] Fix spy broken radio messages
 
I tested this when it was first posted, works like a charm :up:

NegroCollegeFund 02-06-2010 20:50

Re: [TF2] Fix spy broken radio messages
 
I've installed this along side FuncommandsX and it seems that players will randomly have or lose their spy radio voice, and using a command like !disco acts as a toggle, fixing and breaking the spy audio. Please help, I have to assume I'm doing something wrong as no one else has posted issues.

Thanks
Edit: Funnily enough, I used "sm plugins unload spymessagefix" and all seems well now. What gives?

Flyflo 02-07-2010 06:31

Re: [TF2] Fix spy broken radio messages
 
Oh, I thought this plugin was not approved :)

NegroCollegeFund, does it really happen randomly or do you know how I can reproduce the problem myself ?

NegroCollegeFund 02-07-2010 12:49

Re: [TF2] Fix spy broken radio messages
 
It seems that the spy messages are broken upon server start; reloading, then unloading the spymessagefix plugin fixes it. I'll have to investigate more to see if there is a true pattern. I'd have done so already but its working fine right now. When there's less players on I'll restart it and get better info for you. I should have tested it in more detail before making my first post, my apologies.

Flyflo 02-07-2010 13:30

Re: [TF2] Fix spy broken radio messages
 
Thanks :wink:
Anyway, I totally rewrote the plugin (397 lines less). It should be more efficient.

MasterOfTheXP 06-05-2012 03:48

Re: [TF2] Fix spy broken radio messages
 
1 Attachment(s)
Sorry for ancient bump, but this is a very good fix idea...it's just that the current method (block the sound and emit a new one) is pretty glitchy in my experience. Sometimes it plays double sounds, and using another voice command doesn't stop the first one, etc...

Here's a version that does everything the same, except it changes the current sound instead of playing another.

Flyflo 06-05-2012 04:32

Re: [TF2] Fix spy broken radio messages
 
Thanks,

It was one of my first plugins and after looking at the code now, there are a lot of things to change :)
I'll update it shortly with your modification and mine.

PS: Done, attached 1.2 version in the first post.

MasterOfTheXP 06-05-2012 18:27

Re: [TF2] Fix spy broken radio messages
 
Alright, cool!

Also, yeah, if you noticed, I goofed where it checked for the first client, which I just noticed but you seem to have caught first. Thanks for fixing it.


All times are GMT -4. The time now is 05:44.

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