Jump to content

Upgrade script automatically


Estevam2d

Recommended Posts

Posted
I wanted to restart a script at time 15000 and do not know how to do this.

You can use in order to restart every 15000ms (or any other time-difference)

setTimer 

Posted

Well, I feel so much sorry to the pc who will explode because of the RAM overuse caused by Timers. I do not advise you to restart a resource every short period, it can cause a huge lag and f... up a server.

430x73_B2E03D_FF9900_000000_000000.png

Some people want it to happen, some wish it would happen, others make it happen.

Posted
Well, I feel so much sorry to the pc who will explode because of the RAM overuse caused by Timers. I do not advise you to restart a resource every short period, it can cause a huge lag and f... up a server.

I doubt that's a big problem unless there are client-side files in the resource - also, there is no major memory leakage in Multi Theft Auto (or any at all), which means it wouldn't blow up anybody's computer. Thing is, restarting a resource every now and then will lag the server regardless of its size.

If I helped you, please click the like button on the right ;) Thanks!

Posted

Why are people so against setTimer? It really isn't as bad as most people think, unless you create hundreds or thousands of them with onClientRender and it also depends on what you do with the timer.

As for restarting the resource, you can use startResource and stopResource to restart it with a timer, or by other means if you so desire. Just keep in mind that they will require ACL Permission to do this. :)

If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.

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...