How do you change the "Go Go Go" , "Alright let's move out" and so on.. sound at round start?
heres my attemp and it does not work
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <csx>
#include <fakemeta>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new const round_play[][] = {
"player/new/startgo.wav",
"player/new/startmove.wav",
"player/new/startlock.wav"
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_EmitSound, "startround")
// Add your code here...
}
public plugin_precache() {
for(new i; i<3; i++)
{
precache_sound( round_play[i] )
}
}
public startround(id, channel, const sound[], Float:volume, Float:attenuation, flags, pitch)
{
if(!is_user_connected(id))
return FMRES_IGNORED;
//Checks if the user is connected
if(containi(sound, "com_go") != -1 || containi(sound, "moveout") != -1 || containi(sound, "locknload") != -1 || containi(sound, "go") != -1 || containi(sound, "letsgo") != -1)
{
// Here it will play your sound and block the old one
engfunc(EngFunc_EmitSound, id, channel, round_play[random_num(0, sizeof round_play - 1)], 1.0, 0.92, flags, pitch);
return FMRES_SUPERCEDE;
}
return FMRES_IGNORED;
}