I want to play a sound file (wav) for a client when he gains XP in a mod I'm working on... But the sound won't play (or atleast I can't hear it)...
Here's my hook_death code:
PHP Code:
public hook_death() {
new Killer = read_data(1)
new Victim = read_data(2)
new KillerName[32], VictimName[32]
get_user_name(Killer, KillerName, 31)
get_user_name(Victim, VictimName, 31)
if(is_user_connected(Killer) && !is_user_alive(Victim)) {
p_xp[Killer] += XP_PER_KILL
client_print(Killer, print_chat, "[%s] %s recieved %d XP for killing %s", MOD, KillerName, XP_PER_KILL, VictimName)
emit_sound(Killer,CHAN_ITEM, "sound/mymod/gainxp.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
}
...and yeah, the wav file exist... ;)
__________________