#DaMiAnO Posted March 30, 2012 Posted March 30, 2012 MySQL: function connectToMySQL() mysql = dbConnect("mysql", "dbname=test", "host=localhost", "root", "") outputServerLog("[MySQL] Connected!\n") if(mysql ~= nil) then outputServerLog("[MySQL] Disconnected...\n") destroyElement(mysql) end end This not working. outputServerLog isnt showing. Restart: function restartServer() local hour, mins = getTime() local allResources = getResources() if(hour == 12) and (mins == 00) then for index, res in ipairs(allResources) do if getResourceState(res) == "running" then restartResource(res) outputDebugString("GameMode restarted!", 3, 0, 224, 0) end end end end setTimer(restartServer, 3600000, 1, source) This not working. Resources arent restatred.
Cadu12 Posted March 30, 2012 Posted March 30, 2012 MySQL: mysql = dbConnect("mysql", "dbname=test", "host=localhost", "root", "") outputServerLog("[MySQL] Connected!\n") if(mysql ~= nil) then outputServerLog("[MySQL] Disconnected...\n") destroyElement(mysql) end Restart: function restartServer() local hour, mins = getTime() local allResources = getResources() if(hour == 12) and (mins == 00) then for index, res in ipairs(allResources) do if getResourceState(res) == "running" then restartResource(res) outputDebugString("GameMode restarted!", 3, 0, 224, 0) end end end end setTimer(restartServer, 1000, 0)
#DaMiAnO Posted March 31, 2012 Author Posted March 31, 2012 Need permission for restart resource. What is right? You can give me what I have to write the ACL?
Kenix Posted March 31, 2012 Posted March 31, 2012 ex <group name="mysql"> <acl name="mysqlACL"></acl> <object name="resource.yourresourcename"></object> </group> <acl name="mysqlACL"> <right name="function.restartResource" access="true"></right> </acl> Updated.
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