Raised This Month: $ Target: $400
 0% 

[HELP] Background music on HLDS


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
m4m3ts
Senior Member
Join Date: Jun 2012
Old 11-06-2013 , 18:36   Re: [HELP] Background music on HLDS
Reply With Quote #2

Quote:
Originally Posted by m.touqeerafzal View Post
can any 1 tell me how to play any music on background in my HLDS when players were playing CS..
put your music file on CS folder
Counter-Strike 1.6\cstrike\sound\ambience\ (put in here)
you only can play .wav format.

then play cs, open console, type this
spk ambience/yourMusictitle
hit enter.

type stopsound to stop music.
that's for 1 player only.

this for all player.
only admin can execute this.

PHP Code:
#include <amxmodx>

public plugin_precache()
{
    
precache_sound("ambience/yourMusictitle.wav")
}

public 
plugin_init()
{
    
register_plugin"playMusic""1.0""m4m3ts" )

    
register_clcmd("say /play""playmusic"ADMIN_BAN)
    
register_clcmd("say /stop""stopmusic"ADMIN_BAN)
}

public 
playmusic(id)
{
    
client_cmd0"yourMusictitle")
}

public 
stopmusic(id)
{
    
client_cmd0"stopsound")


Last edited by m4m3ts; 11-06-2013 at 18:43.
m4m3ts is offline
 



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 23:16.


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