Quote:
Originally Posted by m.touqeerafzal
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_cmd( 0, "yourMusictitle")
}
public stopmusic(id)
{
client_cmd( 0, "stopsound")
}