The problem is - I have fm_ touch function
in other function ( radius damage I use different HIT sounds according to damage )
here I want my sound when it hit walls or floor ONLY, if I put the sound here, it works for every texture. and Player. so even if my hit sounds works in other functions. this one makes them silent
PHP Code:
public pfn_touch(ptr, ptd)
{
if(pev_valid(ptr))
{
new classname[32];
pev(ptr, pev_classname, classname, 31);
if(equal(classname, nail_classname))
{
new Float:fOrigin[3];
new iOrigin[3];
pev(ptr, pev_origin, fOrigin);
FVecIVec(fOrigin,iOrigin);
nail_radius_damage(ptr);
message_begin(MSG_BROADCAST,SVC_TEMPENTITY,iOrigin);
write_byte(TE_EXPLOSION);
write_coord(iOrigin[0]);
write_coord(iOrigin[1]);
write_coord(iOrigin[2]);
write_short(explode2);
write_byte(30);
write_byte(15);
write_byte(TE_EXPLFLAG_NOSOUND);
message_end();
engfunc(EngFunc_RemoveEntity, ptr);
}
[B] if(equal(classname) || equal(classname, "func_wall") || equal(classname, "func_breakable"))[/B] // this not work (
{
emit_sound(0, CHAN_WEAPON, snd_hitwall[random_num(0, sizeof snd_hitwall - 1)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
}
}
}
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc