Raised This Month: $ Target: $400
 0% 

Add song when HUD shows?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MrKiller2010
Senior Member
Join Date: Aug 2012
Old 08-07-2013 , 12:11   Add song when HUD shows?
Reply With Quote #1

I want to add a small .wav sound when It shows the HUD message.
I mean at the same time as the Message shows..

PHP Code:
public FreeGame(id)
{
    
g_iCurrentGame GAME_FREEGAME
    
    set_hudmessage 
018430, -1.00.3500.15.00.10.1, -)  
    
show_hudmessage 0"[SWE-KUNG]: Enjoy Your FreeDay!!!!")

Thanks
MrKiller2010 is offline
Firippu
Senior Member
Join Date: Jan 2007
Old 08-07-2013 , 13:19   Re: Add song when HUD shows?
Reply With Quote #2

PHP Code:
new g_szSound[]="/subfolder/example.wav"

public FreeGame(id

    
g_iCurrentGame GAME_FREEGAME

    set_hudmessage 
018430, -1.00.3500.15.00.10.1, -)
    
show_hudmessage 0"[SWE-KUNG]: Enjoy Your FreeDay!!!!")

    
client_cmd(0,"spk ^"%s^"",g_szSound
}

public 
plugin_precache() {
    
precache_generic(g_szSound)

or if the wav is built into the game you could probably get by with just
PHP Code:
public FreeGame(id)  
{  
    
g_iCurrentGame GAME_FREEGAME 

    set_hudmessage 
018430, -1.00.3500.15.00.10.1, -
    
show_hudmessage 0"[SWE-KUNG]: Enjoy Your FreeDay!!!!"

    
client_cmd(0,"spk ^""/subfolder/example.wav"^"")  

__________________
Firippu 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 15:51.


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