villr Posted January 3, 2011 Posted January 3, 2011 So i have some problems with my script im making. The problem is when that things in script im making are "finished" with what they do i want to restart the script but it dont work here is code EDIT: randoms is name of script i wanna restart! function restartthisscript() local allResources = getResources() for index, res in (randoms) do if getResourceState(res) == "running" then restartResource(res) end end end and here its the part to restart it its more but thats just that setTimer(restartthisscript, 6000, 1) Whats the problem? Happy Owner/Leader of SELS:RPG | Cops and Gangsters | TRUE CRIME CITY with a lot of JOBS! Scripted since summer 2010
Aibo Posted January 3, 2011 Posted January 3, 2011 function restartthisscript() local res = getResourceFromName("randoms") if getResourceState(res) == "running" then restartResource(res) end end ?
villr Posted January 3, 2011 Author Posted January 3, 2011 thx that helped me veeeery mutch Happy Owner/Leader of SELS:RPG | Cops and Gangsters | TRUE CRIME CITY with a lot of JOBS! Scripted since summer 2010
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