diff --git a/baseResource/client.lua b/baseResource/client.lua index bad0645..f11f52b 100644 --- a/baseResource/client.lua +++ b/baseResource/client.lua @@ -21,9 +21,11 @@ blacklistObjects = {} -- blacklistObjects[7323] = true tempObj = false -logpath = "log.txt" if fileExists(logpath) then fileDelete(logpath) end -logfile = fileCreate(logpath) +if debugToggle then + logpath = "log.txt" + logfile = fileCreate(logpath) +end function registerCollisionArchive(path) cols = engineGetCOLsFromLibrary(path) @@ -153,5 +155,8 @@ addEventHandler("onClientResourceStop",root,function(res) for key,_ in pairs(objectRegister) do engineFreeModel(objectRegister[key]["realID"]) end + if debugToggle then + fileClose(logpath) + end end end) \ No newline at end of file