Jump to content
  • 0

Restart every X minutes the script


Vincent

Question


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

Hi,

how can i restart a script every X minutes?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

Put

minuteX:

Where x is the minute you want the script to start on every hour.

 

Or

 

OnInit: OnTimerX: initnpctimer;

 

Where X is the amount of milliseconds you want to wait before re-running the script.

 

Oninit: <script> Sleep X; goto Oninit;

 

Where X is the amount of time you want to wait between activations in milliseconds.

 

You can do more things if a player is attached.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

big thanks helps a lot :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...