Hey everyone, this is my first script, and my goal was ot have a song play everytime the round starts. So far, it works, but some people don't want it to play every round, so I was wondering how I could go about doing this without making 32 cvars, one for each player.
This is the script as of right now:
Quote:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init()
{
register_plugin("Theme Music Player", "0.1", "Demonic")
register_cvar("play_song","1")
register_logevent("play_theme_song",2,"0=Worl d triggered","1=Round_Start")
}
public play_theme_song()
{
if(get_cvar_num("play_song") == 0)
{
return PLUGIN_HANDLED
}
client_print(0,print_chat,"Welcome to *Team-@[CoDc] Clan Server. Got POONED?")
client_cmd(0,"spk misc/CDC2562.wav")
return PLUGIN_HANDLED
}
public plugin_precache()
{
precache_sound("misc/CDC2562.wav")
return PLUGIN_CONTINUE
}
|
Thanks A Lot!
- Demonic