menu item time limit
Hey!
Im not good at scripting yet so i need help with menu item time limit code, so if someone picks like "noclip" from menu once, and tries to do it again in 90 seconds, menu says "You can pick noclip after 90 seconds". Thanks already :) |
Re: menu item time limit
Have a variable that contains the timestamp at which they can use it again. Then, everytime they call the menu (or whatever) you check to see if their stored time is less than get_systime(). If yes, then let them choose, if no, show your message. Each time they choose, add the 90 to get_systime() and store that as the new timestamp.
|
Re: menu item time limit
Thanks for reply fysik, but could you post me the full code? Im not enought good at scripting yet, im doing my first plugin at this moment. Sorry aboat my poor english.
|
Re: menu item time limit
Quote:
|
Re: menu item time limit
Here is the full code:
PHP Code:
|
Re: menu item time limit
Ok, here ya go. You can study the code that I added and change if needed. But, if you want to add it to other options or change what options it handled then you should do it on your own since you have all you need now.
PHP Code:
|
Re: menu item time limit
Quote:
|
Re: menu item time limit
Quote:
PHP Code:
|
Re: menu item time limit
Thanks alot man, i knew you guys are friendly on these forums :):)
|
Re: menu item time limit
Quote:
|
| All times are GMT -4. The time now is 12:02. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.