Участник
Пользователь
- Сообщения
- 278
- Реакции
- 137
Hey everybody,
I was trying something and I got a problem. I couldn't block sound or change. What is wrong with that?
Even it's not working.
I was trying something and I got a problem. I couldn't block sound or change. What is wrong with that?
rh_emit_sound2
is working but the original stepsound keeps playing. And also I tried to make flVolume 0.0, didn't work. Why SetHookChainArg
doesn't work and also HC_SUPERCEDE
?
Код:
new const soundfile[] = "try/try.wav"; //sound/try/try.wav
RegisterHookChain(RH_SV_StartSound, "@SV_StartSound", .post = false);
@SV_StartSound(const iRecipients, const iEntity, const iChannel, const szSample[], const flVolume, Float:flAttenuation, const fFlags, const iPitch) {
switch(szSample[10]) {
case 's': {
//player/pl_step
rh_emit_sound2(iEntity, iEntity, CHAN_BODY, soundfile, VOL_NORM, ATTN_STATIC, 0, PITCH_NORM);
SetHookChainArg(4, ATYPE_STRING, soundfile);
return HC_SUPERCEDE;
}
case 'w': {
//player/pl_wade
SetHookChainArg(5, ATYPE_INTEGER, 0);
}
}
return HC_CONTINUE;
}
Код:
@SV_StartSound(const iRecipients, const iEntity, const iChannel, const szSample[], const flVolume, Float:flAttenuation, const fFlags, const iPitch) {
return HC_SUPERCEDE;
}
Последнее редактирование: