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")
}