Well, both ways look correct.
Thanks for helping me guys.
But it still doesn't work xD
PHP Code:
public hitsound(id)
{
if (random_num(1,5) == 5)
{
new sound[23] = "gad/hitsounds/hitX.wav"
sound[17] = '0' + random_num(1, 8)
emit_sound(id, CHAN_BODY, sound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
}
}
the public hitsound(id) function is being called for sure, but the sound doesn't go on
it although works with console (spk sound/gad/hitsound/hit1.wav)