Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if !SERVER then return end
- TTTStats = {}
- TTTStats.ChatCommand = "!stats" -- Command said in chat to open stats
- TTTStats.ConCommand = "tttstats" -- Console command to open stats
- TTTStats.DataType = 2 -- 1 = SQLite, 2 = MySQL, 3 = nothing, so dont do it.
- -- 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
- -- If you start stats on MySQL, you will not need to worry about anything below the MySQL connection information
- TTTStats.Host = "localhost" -- Host
- TTTStats.DatabaseName = "thhfhgfhgf" -- Database name
- TTTStats.User = "root" -- Username
- TTTStats.Password = "trrry" -- Password
- TTTStats.Port = 3306 -- Port, usually 3306
- ----- SETTINGS BELOW HERE ARE FOR CONVERTING SQLITE TO MYSQL -----
- --[[
- Instructions:
- Read all of these instructions before attempting the process.
- For converting your data from SQLite to MySQL, please follow the instructions CAREFULLY! Messing up can ruin your data
- To start, set your data type to 2, and fill in your MySQL database information
- Once this is done, please restart the server, and run the command 'UploadTTTStats'
- This will then begin to lag the server, however let it do it's work
- Once it finishes, the server should automatically restart and begin using MySQL
- These settings below are for your personal use to indicate the process
- While this process is going on, please do not join or invite players to join
- Tampering or modification of the data while uploading can result negatively
- Known Problems:
- If you are using a host, such as NFOServers, it automatically restarts after 5 minutes of an unresponsive server
- In the case that this happens, shut down your server, and make a copy of the sv.db file in garrysmod/
- Please then find a tutorial on how to install a local garrysmod server, and install the MySQL extensions needed
- Once this is done, do the same process locally
- Alternatively, you can just make a copy of your server, and it should have all of the MySQL extensions needed already installed
- Once you have ensured that this is all done, do the following.
- If your host does stop the upload by restarting the server, please do the following:
- Run the command 'TTTStatsContinue'. This removes the limitation to prevent the upload from occuring twice
- There should be some indication that the limitation has been successfully removed, leading to the continuing of the process
- Upon this indication, please then execute the 'TTTStatsClearDB' command. This will remove all data/partal data from the database
- 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
- What NOT to do:
- -Restart the server during this process
- -Upload the data multiple times, hence the limitation
- -Tamper with any of the core files, I will NOT support modified versions
- 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
- ]]--
- TTTStats.ShowMaintenance = true -- Place [MAINTENANCE] tag in front of your server name? Suggested to show players what you're doing.
- 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