Code:
#include <amxmodx>
new T_Win[][] =
{
"stealsounds/twin"
}
new I_Win[][] =
{
"stealsounds/Iwin"
}
public plugin_init ( )
{
register_plugin ( "New Steal C4", "1.0", "Copper" );
register_event( "SendAudio", "eT_win" , "a", "2&%!MRAD_terwin" );
register_event( "SendAudio", "eCT_win", "a", "2&%!MRAD_ctwin" );
}
public eT_win(id)
{
if(is_user_alive(id) && is_user_connected(id) )
{
client_cmd(0,"spk ^"%s^"",T_Win[random_num(0,sizeof T_Win - 1)])
}
}
public eCT_win(id)
{
if(is_user_alive(id) && is_user_connected(id) )
{
client_cmd(0,"spk ^"%s^"",I_Win[random_num(0,sizeof I_Win - 1)])
}
}
public plugin_precache( )
{
precache_sound ( "stealsounds/Iwin.wav" );
precache_sound ( "stealsounds/twin.wav" );
}
Can anyone tell me what I did wrong? I am editing the stealc4 plugin and I want to be able to play a sound after the round is over. I am not going to post the whole plugin because this is the only part that isn't working properly.