Jump to content

Creating a script which reloads a resource at a certain time


Thomas_Matthew

Recommended Posts

Posted
restartResource 
startResource 
stopResource 
[url=https://wiki.multitheftauto.com/wiki/OnResourceStart]https://wiki.multitheftauto.com/wiki/OnResourceStart[/url] 
[url=https://wiki.multitheftauto.com/wiki/OnResourceStop]https://wiki.multitheftauto.com/wiki/OnResourceStop[/url] 

Posted

use setTimer and leave the timer to run indefinitely every 5 seconds or so and check if #getElementsByType('player') returns 0

if it does return 0 then restartResource() and destroy the timer

and no 'else'

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