Posts: 10
Threads: 2
Joined: Feb 2011
Reputation:
0
Hi I need a variable that goes down every second can someone please explain me it?
Posts: 1,739
Threads: 53
Joined: Oct 2010
Reputation:
0
Use a timer that repeats itself every 1 second and decreases the variable by 1...
Posts: 10
Threads: 2
Joined: Feb 2011
Reputation:
0
How do I do that, I'm guessing SetTimerEx but I never worked well with it.....
Like variable is JailTime[MAX_PLAYERS]
I want it decreased by 1 every second, so when it reaches 0 the guy is unjailed which I will script later...
Posts: 918
Threads: 125
Joined: Nov 2010
Use set timer.
Like:
New val;
SetTimer("decreaseval", 1000, true);
This will repeat every 1000 ms = 1 second.
forward decreaseval();
public decreaseval()
{
val--;
return 1;
}