View Single Post
Author Message
Kemsan
Member
Join Date: Sep 2009
Location: Poland, Bytom
Old 08-28-2011 , 11:11   [ANY] Event Sounds
Reply With Quote #1

Event Sounds 1.2

Description:
Plugin add feature to push sound to client after run each game event. Works with all game, and all game events. Plugin are very very easy to conifgure. Auto precache, download and play random sound. It's easy, it's here! Build round sound - easly. Enter sounds, end round sounds, start round sounds, kill sounds - all in one, easly!

Cvars:

sm_event_sounds_version - Version of plugin
sm_event_sounds_play_type Default "SOUND_PLAYTYPE" value for each event; 1 - use client based command ( play SOUND ), 2 - use game sound effect
sm_event_sounds_notify_msg Default "NOTIFY_MSG" value for each event; {SOUND_NAME} - actual played sound
sm_event_sounds_notify_delay Default "NOTIFY_MSG_DELAY" value for each event; Delay before show notify, 0.0 turn off notify show
sm_event_sounds_sound_delay Default "NOTIFY_SOUND_DELAY" value for each event; Delay before play sound; Minimum 0.1
sm_event_sounds_color_notify Use special coloring function for notify? 0 - disable, 1 - enable
sm_event_sounds_clientonly Default "SOUND_CLIENTONLY" value for each event; 0 - push sound to client and all ( if need ), 1 - push always to client ( if exists )

Chat commands:

!stop, /stop - stop actual playing sound
!stopall, /stopall - stop all sounds, now playing and others in the future


Key values help:


Example event (player_spawn):

PHP Code:
"player_spawn"
    
{
        
//Conditions
        
"conditions"
        
{
            
//First - event value name, sec (after : ) - value type (string,int,float,userid). Value - condition value ( userid  = 1 ); ex: weapon:string - scattergun - if weapon are scattergun, plugin push sound.
            
"userid:userid"     "1"
        
}
        
//Sounds
        
"sounds"
        
{
            
"Warioware Intro Sound"     "sound/MySoundFolder/sample.mp3" //First element - sound name, next element - sound path
            
"Other sound"     "sound/MySoundFolder/OtherSound.mp3" //First element - sound name, next element - sound path
        
}
        
//Options
        
"options"
        
{
            
"NOTIFY_MSG"    "{olive}Hello camrat! You hear {teamcolor}{SOUND_NAME}!" //Sound notify message
            
"NOTIFY_MSG_DELAY"    "0.1" //Show notify message after this time
            
"NOTIFY_SOUND_DELAY"    "0.1" //Play sound to client / all clients after this time
            
"NOTIFY_PUSH_SOUND" "1" //Allow or disallow to push sound
            
"SOUND_PLAYTYPE"    "1" //"Playtype" for actual event - 1 - use client commd (play), 2 - use sdk sound function (emtisound)
            
"SOUND_CLIENTONLY" "1" //0 - play all clients ( if can ), 1 - play sound only for client ( if exists )
        
}
    } 


Event list:
Special event name "player_enter", fire after play connect into server and see motd ( PostAdminCheck ) - works like my EnterSounds plugin.


Changelog:
  • Version 1.0 (28.08.2011)
    • Initial/Public Release
  • Version 1.1 (29.08.2011)
    • Added two client commands
      • !stop, /stop - stop actual playing sound
      • !stopall, /stopall - stop all sounds, now and in the future
  • Version 1.2 (16.10.2011)
    • Changed hook event system - hook only used events
    • Added conditions
    • Added only show notify option

Installation:

  • Put event_sounds.smx to sourcemod/plugins
  • Put event_sounds.sp to sourcemod/scripting
  • Put event_sounds.keys.txt to sourcemod/configs
In .zip you find sample of event_sounds.keys.txt
Wait for change map or write in rcon - sm plugins load event_sounds

Plugin using:
Warning! Werborten! Uwaga!

If you do not hear music after download it from server - restart your Team Fortress 2 / CS:S / DOD:S, any other game.

Sorry for my bad english:]
Attached Files
File Type: zip event_sounds.zip (723.0 KB, 1079 views)
File Type: zip event_sounds_1.1.zip (724.7 KB, 826 views)
File Type: smx event_sounds.smx (13.1 KB, 746 views)
File Type: sp Get Plugin or Get Source (event_sounds.sp - 970 views - 20.3 KB)
File Type: zip event_sounds_1.2.zip (709.6 KB, 1676 views)
__________________

Last edited by Kemsan; 10-16-2011 at 07:41. Reason: added description
Kemsan is offline