Raised This Month: $ Target: $400
 0% 

Need help looping sounds!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 01-15-2007 , 04:39   Re: Need help looping sounds!
Reply With Quote #3

I'm actually kind of wondering why this method won't work:

PHP Code:
new Float:SoundTimer[33]
 
set_task(0.01,"My_0.01_settask",0,"",0,"b")
 
public 
client_putinserver(id)
   
SoundTimer[id]=halflife_time()
 
public 
My_0.01_settask(id)
{
if(
SoundTimer[id]-halflife_time()>1.0)
   {
    
emit_sound(id,CHAN_ITEM,"mysoundloop.wav",1.0,ATTN_NORM,0,PITCH_NORM)
    
SoundTimer[id]=halflife_time()
   }

I could possibly try to mimic having it timed, since theoretically it should go through this task 10 times each sound play, so I could just keep track of it that way, but I'm not sure if that's where the problem is or not.
__________________

Last edited by Bad_Bud; 01-15-2007 at 15:26.
Bad_Bud is offline
 



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 22:25.


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