Help Add CMD limit in this system
#2

There are several ways you can do this, all require you to create a variable to store the time when the player used the system last or if the player has used it. The first method is using a timer, when the command is successfully performed, set a player variable to 1 and SetTimerEx for the desired amount of time to reset the variable. You can then write a conditional statement before to check if the variable equals 0, if not, don't do anything.

The second and third methods are closely related. Instead of a boolean, you need to store the current tick count using GetTickCount or a unix timestamp using gettime when the command is successfully performed, then evaluate the variable against the count / time when the command is next performed.

I'm sure someone will come along and script the entire thing for you but I just wanted to encourage you to learn to do things by yourself.
Reply


Messages In This Thread
Help Add CMD limit in this system - by dickyodie - 12.01.2012, 06:02
Re: Help Add CMD limit in this system - by JamesC - 12.01.2012, 06:53

Forum Jump:


Users browsing this thread: 1 Guest(s)