Bean666 Posted January 16, 2015 Share Posted January 16, 2015 hi guys is it possible to restart a resource automatically every 3 minutes? i know it is has some setTimer functions but i need help with it. any help appreciated Link to comment
The Creator Posted January 16, 2015 Share Posted January 16, 2015 You need this functions: setTimer restartResource Link to comment
Bean666 Posted January 16, 2015 Author Share Posted January 16, 2015 i know but i need some help with it. Link to comment
Mr_Moose Posted January 16, 2015 Share Posted January 16, 2015 Add this to the resource you want to restart. local _this = getThisResource( ) setTimer( restartResource, 3*60*1000, 1, _this ) BTW why do you need to restart it, there may be better solutions as this is a waste of performance. Link to comment
Bean666 Posted January 16, 2015 Author Share Posted January 16, 2015 should i add that on the client or the server of the resource file? and by the way that time 3*60*1000 is 3 minutes right? Link to comment
Mr_Moose Posted January 16, 2015 Share Posted January 16, 2015 Server side, a tip is to check the syntax color on this forum or in wiki, orange means server side, red is client and blue shared (works on both server and client), by that you can clearly se it has to be executed server side. 3*60*1000 = 180000ms which is 3 minutes, may be easier to read if it's written as I wrote in my example. Link to comment
Et-win Posted January 16, 2015 Share Posted January 16, 2015 Remember that it requires rights in ACL Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now