Mr.ArO Posted January 7, 2011 Share Posted January 7, 2011 Hello Is there a resource that restarts another resource ?? (ex. there are cars in the map when players play they move them, blow up and etc.. that resource restarts the car map from 30 minutes over and over again) Link to comment
Castillo Posted January 7, 2011 Share Posted January 7, 2011 server.lua: function autoRestart() restartResource(getResourceFromName("carsmap")) end setTimer(autoRestart,1800000,0) meta.xml: <meta> <script src="server.lua" type="server"/> </meta> you have to give the resource admin rights because restartResource requires them to work. Link to comment
Mr.ArO Posted January 7, 2011 Author Share Posted January 7, 2011 Thanx but is it possible to make a timer? Link to comment
Castillo Posted January 7, 2011 Share Posted January 7, 2011 setTimer(autoRestart,1800000,0) what do you think is that? 1800000 = 30 minutes Link to comment
Mr.ArO Posted January 7, 2011 Author Share Posted January 7, 2011 no not that timer a timer that shows how much is left for restart Link to comment
Castillo Posted January 7, 2011 Share Posted January 7, 2011 look, if you want that you can script it yourself because i won't do it. Link to comment
proracer Posted January 8, 2011 Share Posted January 8, 2011 no not that timer a timer that shows how much is left for restart You can use this. https://wiki.multitheftauto.com/wiki/GetTimerDetails OR https://wiki.multitheftauto.com/wiki/GetTickCount But if you want timer to put on screen I think you should check how the "missiontimer" resource works. It's in your resources folder as default. 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