Raised This Month: $ Target: $400
 0% 

[FM] touch textures with different sound


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
avril-lavigne
Banned
Join Date: Apr 2009
Old 08-01-2011 , 13:24   [FM] touch textures with different sound
Reply With Quote #1

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(ptrptd)
{        
        if(
pev_valid(ptr))
        {    
            new 
classname[32];
            
pev(ptrpev_classnameclassname31);
        
            if(
equal(classnamenail_classname))
            {    
                new 
Float:fOrigin[3];
                new 
iOrigin[3];
                
pev(ptrpev_originfOrigin);
                
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_RemoveEntityptr);    
                              }
                         

                            [
B] if(equal(classname) || equal(classname"func_wall") || equal(classname"func_breakable"))[/B]   // this not work (
                                
{
                    
emit_sound(0CHAN_WEAPONsnd_hitwall[random_num(0sizeof snd_hitwall 1)], VOL_NORMATTN_NORM0PITCH_NORM
                               }      
 
          }                               

__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc
avril-lavigne is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode