Thanks. Still, the main problem remains.
Seems it can only replace some sounds.
E.g. something happend to crowbar-hits-wall-sound,
but the sound of a crossbowbolt being shot
cannot be changed.
Also, the only change I can manage is that it says SV_StartSound: sound xyz not precached.
Whereas xyz would still be the original sound.
So I'd have to hook up SV_StartSound.
Is this possible? I'm finding nothing comparable anywhere.
Also, I have to unregister the forward at an appropriate point.
EDIT: I am so completely unsure if I am using forward_return correctly here.
Can I just return the parameters one after another like this?
Code:
public sr_es(ent, iChannel, const szSample[], Float:fVolume, Float:fAttenuation, iFlags, iPitch) {
for(new j = 0; j < i; j++) {
if(equali(szSample, column1[j])) {
forward_return(FMV_CELL, ent);
forward_return(FMV_CELL, iChannel);
forward_return(FMV_STRING, column2[j]);
forward_return(FMV_FLOAT, fVolume)
forward_return(FMV_FLOAT, fAttenuation)
forward_return(FMV_CELL, iFlags)
forward_return(FMV_CELL, iPitch)
return FMRES_SUPERCEDE;
}
}
return FMRES_IGNORED;
}
__________________