Advertisement
Guest User

Untitled

a guest
Oct 18th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.40 KB | None | 0 0
  1. if !SERVER then return end
  2.  
  3. TTTStats = {}
  4.  
  5. TTTStats.ChatCommand = "!stats" -- Command said in chat to open stats
  6. TTTStats.ConCommand = "tttstats" -- Console command to open stats
  7.  
  8. TTTStats.DataType = 2 -- 1 = SQLite, 2 = MySQL, 3 = nothing, so dont do it.
  9.  
  10. -- To use MySQL, please install gmsv_mysqloo as well as libmysql. This page should give all of the needed details https://facepunch.com/showthread.php?t=1220537
  11. -- If you start stats on MySQL, you will not need to worry about anything below the MySQL connection information
  12.  
  13. TTTStats.Host = "localhost" -- Host
  14. TTTStats.DatabaseName = "thhfhgfhgf" -- Database name
  15. TTTStats.User = "root" -- Username
  16. TTTStats.Password = "trrry" -- Password
  17. TTTStats.Port = 3306 -- Port, usually 3306
  18.  
  19. ----- SETTINGS BELOW HERE ARE FOR CONVERTING SQLITE TO MYSQL -----
  20.  
  21. --[[
  22.  
  23. Instructions:
  24. Read all of these instructions before attempting the process.
  25.  
  26. For converting your data from SQLite to MySQL, please follow the instructions CAREFULLY! Messing up can ruin your data
  27. To start, set your data type to 2, and fill in your MySQL database information
  28. Once this is done, please restart the server, and run the command 'UploadTTTStats'
  29. This will then begin to lag the server, however let it do it's work
  30. Once it finishes, the server should automatically restart and begin using MySQL
  31. These settings below are for your personal use to indicate the process
  32. While this process is going on, please do not join or invite players to join
  33. Tampering or modification of the data while uploading can result negatively
  34.  
  35. Known Problems:
  36. If you are using a host, such as NFOServers, it automatically restarts after 5 minutes of an unresponsive server
  37. In the case that this happens, shut down your server, and make a copy of the sv.db file in garrysmod/
  38. Please then find a tutorial on how to install a local garrysmod server, and install the MySQL extensions needed
  39. Once this is done, do the same process locally
  40. Alternatively, you can just make a copy of your server, and it should have all of the MySQL extensions needed already installed
  41. Once you have ensured that this is all done, do the following.
  42.  
  43. If your host does stop the upload by restarting the server, please do the following:
  44. Run the command 'TTTStatsContinue'. This removes the limitation to prevent the upload from occuring twice
  45. There should be some indication that the limitation has been successfully removed, leading to the continuing of the process
  46. Upon this indication, please then execute the 'TTTStatsClearDB' command. This will remove all data/partal data from the database
  47. It is suggested that you then do this locally, however if you feel it can do it, and are willing to try again, repeat the 'UploadTTTStats' command
  48.  
  49. What NOT to do:
  50. -Restart the server during this process
  51. -Upload the data multiple times, hence the limitation
  52. -Tamper with any of the core files, I will NOT support modified versions
  53.  
  54. If you have started off by using MySQL, then you will not need to do any of the processes above, the addon should work normally
  55.  
  56. ]]--
  57.  
  58. TTTStats.ShowMaintenance = true -- Place [MAINTENANCE] tag in front of your server name? Suggested to show players what you're doing.
  59. TTTStats.LockPassword = "asdsdasasdasdasd" -- During the upload process of data, it should not be tampered with. This clears the server and locks it up with this password, preventing data changes during upload.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement