Raised This Month: $ Target: $400
 0% 

Team Flash Snitch


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose        Approver:   Hawk552 (427)
Tender
Junior Member
Join Date: Nov 2005
Location: Sweden
Old 11-04-2007 , 13:58   Team Flash Snitch
Reply With Quote #1

Team Flash Snitch

Description:
When teamflashed, this plugin announces who flashed you. The teamflasher
hears "I'm blind!" and gets a message of who he flashed.
It is also displayed for admins if someone is fully teamflashed.
Tested on Counter-Strike and Condition Zero servers.
This does NOT work for 100%... but almost :-)

Cvars:

tfs_adminchat
0 - admins will not be aware
1 - admins gets an adminchat of who flashed who

tfs_sound: Teamflasher hears "I'm blind!", default 1 (CZ bot radio)
0 - Sound Off
1 - Sound On


Changelog:
1.1 - fixed bug: more than one player can get a message from the same teamflash event, new cvar: tfs_adminchat (2007-11-04)
1.0 - sound on/off cvar: tfs_sound 1/0 (2006-04-14)
0.3 - fixed bug: dead spectators will nog get message about teamflash (2006-03-16)
0.2 - changed flash owner code, a timer is added, "[Team Flash Snitch]" in green text (2006-03-12)
0.1 - initial release (2006-01-25)

Credits:
Johnny got hes gun, his plugin "Blind" helped me writing this.
www.paike.org for testing this plugin on paike servers, it has been running for almost two years now.

The zip contains sma, amxx and the soundfile im_blind.wav (not needed for CZ)
Attached Files
File Type: zip TeamFlashSnitch.zip (21.5 KB, 5799 views)
File Type: sma Get Plugin or Get Source (teamflashsnitch.sma - 7358 views - 3.9 KB)
Tender is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 11-04-2007 , 16:34   Re: Team Flash Snitch
Reply With Quote #2

What happens if you flash multiple people?
__________________
M249-M4A1 is offline
Tender
Junior Member
Join Date: Nov 2005
Location: Sweden
Old 11-04-2007 , 16:49   Re: Team Flash Snitch
Reply With Quote #3

Then you get multiple messages:
[Team Flash Snitch] You totally flashed a teammate (paikebot - Connor)
[Team Flash Snitch] You flashed a teammate (paikebot - Ethan)
[Team Flash Snitch] You totally flashed a teammate (paikebot - Ian)
[Team Flash Snitch] You totally flashed a teammate (paikebot - Ted)
Tender is offline
Xtreamus
Junior Member
Join Date: Feb 2009
Old 09-08-2010 , 19:01   Re: Team Flash Snitch
Reply With Quote #4

Quote:
Originally Posted by Tender View Post
Then you get multiple messages:
[Team Flash Snitch] You totally flashed a teammate (paikebot - Connor)
[Team Flash Snitch] You flashed a teammate (paikebot - Ethan)
[Team Flash Snitch] You totally flashed a teammate (paikebot - Ian)
[Team Flash Snitch] You totally flashed a teammate (paikebot - Ted)
Can you show me how to do something like this:
[Team Flash Snitch] You flashed a teammate (paikebot - Ethan)
[Team Flash Snitch] You totally flashed a teammate (paikebot - Connor, paikebot - Ian, paikebot - Ted)
Xtreamus is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 11-04-2007 , 17:05   Re: Team Flash Snitch
Reply With Quote #5

Would you hear the sound multiple times? "spk" commands overlap and hurt the ears
__________________
M249-M4A1 is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 11-07-2007 , 19:33   Re: Team Flash Snitch
Reply With Quote #6

Quote:
Originally Posted by M249-M4A1 View Post
Would you hear the sound multiple times? "spk" commands overlap and hurt the ears
Use the "speak" command instead of "spk" and it will stop the overlapping.
hlstriker is offline
Tender
Junior Member
Join Date: Nov 2005
Location: Sweden
Old 11-04-2007 , 17:16   Re: Team Flash Snitch
Reply With Quote #7

Not really, but technically yes. The sounds are executed at the same time, so you wont hear any overlaps.
Tender is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 11-04-2007 , 17:53   Re: Team Flash Snitch
Reply With Quote #8

Quote:
Originally Posted by Tender View Post
Not really, but technically yes. The sounds are executed at the same time, so you wont hear any overlaps.
When the sound executes at the same time, the volume increases
__________________
M249-M4A1 is offline
Tender
Junior Member
Join Date: Nov 2005
Location: Sweden
Old 11-04-2007 , 18:19   Re: Team Flash Snitch
Reply With Quote #9

You could modify the code with an extra boolean and a timer if you like...

add a new global...
Code:
new bool:sound_active = false
replace
Code:
		if(get_cvar_num("tfs_sound")>0) client_cmd(g_flasher,"spk sound/radio/bot/im_blind.wav")
with

Code:
		if(get_cvar_num("tfs_sound")>0 && !sound_active ){
			client_cmd(g_flasher,"spk sound/radio/bot/im_blind.wav")
			sound_active = true
			set_task(0.5,"sound_completed")
		}
and add the function:
Code:
public sound_completed(){ 
	sound_active = false
}
the it will only play sound once.. havn't tested it, but it should work
Tender is offline
Tender
Junior Member
Join Date: Nov 2005
Location: Sweden
Old 11-04-2007 , 18:03   Re: Team Flash Snitch
Reply With Quote #10

Isn't that a good punishment? ;-)
Tender 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 10:25.


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