Timer
#6

You could do this without a timer by using Unix timestamps. You can find a real thorough tutorial on them here: https://sampforum.blast.hk/showthread.php?tid=254915

You would store the value of the timestamp the first time the player succeeds the command. Then every time the player types the command, check the current stamp - the variables value, and see if it's greater than the time you want them to have to wait. If so, they can use the command again.
Reply


Messages In This Thread
Timer - by svaba - 14.08.2011, 11:47
Re: Timer - by [MG]Dimi - 14.08.2011, 11:51
Re: Timer - by svaba - 14.08.2011, 11:56
Re: Timer - by TouR - 14.08.2011, 11:58
Re: Timer - by [MG]Dimi - 14.08.2011, 11:59
Re: Timer - by Grim_ - 14.08.2011, 12:15
Re: Timer - by svaba - 14.08.2011, 12:43
Re: Timer - by svaba - 14.08.2011, 12:45

Forum Jump:


Users browsing this thread: 2 Guest(s)