#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. Sorry for my English.
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) Ingame nick: Cadu12
Kenix Posted March 30, 2012 Posted March 30, 2012 Need permission for restart resource. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
#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? Sorry for my English.
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. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
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