Jump to content

Restart Resource


Bean666

Recommended Posts

Posted

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

Posted

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.

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...