Timer to display a Message
#1

Hello,
any ideas, how to make a timer, that every minute would be displayed for 10minutes, and after 10 minutes, disable that, automatically.

I'm trying to add a command for gang leader, that if the gang leader wrote a message /attack, the message would 10x times every minute(so 10minutes) displayer for all: Gang is attacking the Hotel! Go defense that place to earn money! And after 10minutes it would send a last global message like: gang attack is finished.

Any ideas, how can i make it? The whole script, with gang leader, and all i have, i need a idea, how to make this kind of timer.

Thanks forward!
Reply
#2

Create a variable for the timer count, every time the function executes, add += 1 to the variable, check on top of the function if the variable is higher or equal to 10, if so, reset the variable and kill the timer.

That's how i'd do it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)