Raised This Month: $7 Target: $400
 1% 

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, 5786 views)
File Type: sma Get Plugin or Get Source (teamflashsnitch.sma - 7327 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
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 #4

Would you hear the sound multiple times? "spk" commands overlap and hurt the ears
__________________
M249-M4A1 is offline
Tender
Junior Member
Join Date: Nov 2005
Location: Sweden
Old 11-04-2007 , 17:16   Re: Team Flash Snitch
Reply With Quote #5

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 #6

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:03   Re: Team Flash Snitch
Reply With Quote #7

Isn't that a good punishment? ;-)
Tender is offline
Tender
Junior Member
Join Date: Nov 2005
Location: Sweden
Old 11-04-2007 , 18:19   Re: Team Flash Snitch
Reply With Quote #8

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
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 11-05-2007 , 03:41   Re: Team Flash Snitch
Reply With Quote #9

Someone requested a plugin like this the other day. Very interesting to see this.
__________________

BigBaller is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-05-2007 , 11:52   Re: Team Flash Snitch
Reply With Quote #10

If more than 1 flash are throwed at the same time, will show to all flashed players the last owner. :s
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Reply


Thread Tools
Display Modes

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 01:51.


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