You should not register the event if no sounds were found from the parsing.
Also, I would suggest to format directly the sound with spk or mp3 play at parsing time before saving in the array, so you can use directly something like that :
Code:
public EventDeathMsg()
{
client_cmd( read_data( 2 ), "%a", ArrayGetStringHandle( g_aSounds, g_iTotalSounds == 1 ? 0 : random( g_iTotalSounds ) ) );
}
__________________