is there a better way of prechacing a sound and emiting it instead of these?
PHP Code:
if ( file_exists ( "sound/warcraft3/impalehit.wav" ) )
{
precache_sound ( "warcraft3/impalehit.wav" );
}
PHP Code:
//impale
if ( file_exists( "sound/warcraft3/impalehit.wav" ) == 1 )
{
emit_sound( enemy, CHAN_ITEM, "warcraft3/impalehit.wav", 1.0, ATTN_NORM, 0, PITCH_NORM );
}
Thanks.