it prints over 40 times?
#1

I am setting a timer to play a sound, but it plays over 40 times, I added a: print("check"); and it prints over 40 times also.

I am setting this timer:

Код:
SetTimerEx("PlaySoundx", 10000, false, "i", playerid);
I have added print before and after setting the timer, to see if it sets the timer multiple times, but it doesn't...
Does anyone know why this happens?

the function:
Код:
public PlaySoundx(playerid)
{
    print("check");
    PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
    return 1;
}
edit:

it executes PlaySoundx 510 times..
Reply
#2

You're probably setting the timer inside a loop of some kind, could you show us more of the code?
Reply
#3

It's not in a loop, I've added a print before the timer and afterwards, and these print just once like they should.
Reply
#4

Can you show use where you are using "PlaySoundx(playerid)" please.
It might be that it is using that function over and over
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)