AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Team Flash Snitch (https://forums.alliedmods.net/showthread.php?t=62768)

Tender 11-04-2007 13:58

Team Flash Snitch
 
2 Attachment(s)
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)

M249-M4A1 11-04-2007 16:34

Re: Team Flash Snitch
 
What happens if you flash multiple people?

Tender 11-04-2007 16:49

Re: Team Flash Snitch
 
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)

M249-M4A1 11-04-2007 17:05

Re: Team Flash Snitch
 
Would you hear the sound multiple times? "spk" commands overlap and hurt the ears

Tender 11-04-2007 17:16

Re: Team Flash Snitch
 
Not really, but technically yes. The sounds are executed at the same time, so you wont hear any overlaps.

M249-M4A1 11-04-2007 17:53

Re: Team Flash Snitch
 
Quote:

Originally Posted by Tender (Post 549490)
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

Tender 11-04-2007 18:03

Re: Team Flash Snitch
 
Isn't that a good punishment? ;-)

Tender 11-04-2007 18:19

Re: Team Flash Snitch
 
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

BigBaller 11-05-2007 03:41

Re: Team Flash Snitch
 
Someone requested a plugin like this the other day. Very interesting to see this.

Alka 11-05-2007 11:52

Re: Team Flash Snitch
 
If more than 1 flash are throwed at the same time, will show to all flashed players the last owner. :s


All times are GMT -4. The time now is 10:25.

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