Raised This Month: $ Target: $400
 0% 

set_task & sequence question


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SSJ2GOKU
Senior Member
Join Date: Oct 2005
Location: Belgium
Old 07-06-2006 , 12:30   set_task & sequence question
Reply With Quote #1

Hello,

I made a function that requires 2 inputes, the players id and a variable

Code:
public playsound(id, number){
     switch(number){
           case 1:{ emit_sound(id, CHAN_BODY, "sounds/ss/1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) }
           case 2:{ emit_sound(id, CHAN_BODY, "sounds/ss/2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) }
     }
}
now i want to call the function up in set_task
is this the right way to call it up?

Code:
public sound_system(id){
     set_task(1.0, "playsound", id, "1")
     set_task(2.0, "playsound", id, "2")
}

Last edited by SSJ2GOKU; 07-07-2006 at 17:41. Reason: changed title
SSJ2GOKU is offline
Send a message via MSN to SSJ2GOKU
 



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 08:02.


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