Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2018
2,023
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.92 KB | None | 0 0
  1. Configuration
  2. Clockwork now supports SQLite, which means you no longer need to setup a database, but setting one up is still recommended.
  3.  
  4. So you've installed Clockwork and a schema, and you're wanting to set it up so you can finally get into the roleplaying business. You'll need a MySQL database that Clockwork can use for storing its data to use the schema correctly. If you're renting from a gameserver provider, you may have a free MySQL database that comes with your server. Otherwise, you'll need to host your own or get it from a web hosting provider. You can use a database from a free database service, but we highly recommend that you do not use them because they tend to be unreliable, and your data may be wiped at any time without notice.
  5.  
  6. The configuration data is located in /garrysmod/gamemodes/clockwork in a file called clockwork.cfg. The clockwork.cfg file should already have some entries in it, you'll just need to replace the values with your own. It is important to note that every setting must be prefixed with force, and there must be a semicolon at the end of every line that sets a value. Anything prefixed with will be completely disregarded and treated as a comment. Any values that you are going to specify must be underneath a section, which is labelled by text in between square brackets. For example, [MySQL] for the MySQL configuration section.
  7.  
  8. Configuring MySQL
  9. Now that you've gotten your MySQL database set up and ready to have data slapped into it, you can start inputting the MySQL configuration in the Clockwork configuration file. Note: You do not need the MySQL tables to import into your database - Clockwork will automatically set this up for you. The mysql_host entry in your configuration must be an IP address, not a domain. The name for the MySQL section is [MySQL]. Below is a table of each available setting for this section.
  10.  
  11. \
  12. mysql_characters_table \
  13. mysql_players_table \
  14. mysql_username \
  15. mysql_password \
  16. mysql_database \
  17. mysql_host \
  18. mysql_port \
  19. Example MySQL Configuration
  20. \
  21. [MySQL] \
  22. force mysql_characters_table = characters; \
  23. force mysql_players_table = players; \
  24. force mysql_username = Impulse; \
  25. force mysql_password = beepbeep; \
  26. force mysql_database = gmod_clockwork; \
  27. force mysql_host = 127.0.0.1; \
  28. Setting up MySQL on cPanel
  29. - Login to your cPanel Account.
  30. - Click the “MYSQL Wizard” and follow the steps, Making note of the database name,username,password. It is recommended that you select all privileges on the similar step Privileges - At the end you will be told the username and database. Some hosts show you the remote ip (Shown in orange in the image) End Of Wizard - If your mysql database is on the same server as your gameserver(Most cases they are not if you are using seperate webhosting) you will need to enter the % symbol, this is so you can tell cPanel that said remote host can access your databases.
  31.  
  32. - Now fill in the mysql configuration file on your gameserver with the information you wrote down in step 2
  33.  
  34. Clockwork will automatically create the tables for you
  35.  
  36. Setting up MYSQL on a local system
  37. A local server is a SteamCMD server on your pc not a server provided by a GSP
  38.  
  39. - Start by downloading your Garry's Mod server via steamCMD - Gmod Wiki Article
  40. - Follow the installation guide for Clockwork
  41. - Download WAMP This lets us configure MYSQL and gives you a PhpMyAdmin interface
  42. - Now WAMP is setup, start the WAMP server and you should see a icon, It should be green if it isn't click the icon then click start.
  43. - Now click the PhpMyAdmin label, this should open your web browser, and see something similar to the image 2. The username will be “ root ” and the password will be blank.
  44. - Once logged in, click the user's button located at the top then add user below the list.
  45. - Fill in the fields, and generate or create a password. Keep host as localhost or 127.0.0.1 . Note: Make sure you select localhost in the dropdown next to the host field When you reach the next section, tick Create database with same name and grant all privileges
  46. - This has now created a database and a user for you. You should fill in your clockwork.cfg with the information you just created.
  47.  
  48. Configuring Owner
  49. Since there are no ways of setting the rank of a player through the console for security reasons, you'll have to edit a section in the clockwork.cfg file. You'll have to find out your (or another person's, if you so wish) Steam ID. You can do this by using an online service to get your Steam ID by your Steam community URL - such as Steam ID Finder, or in-game using the status command in console. This sets the given Steam ID to a super admin every time your server starts or changes level. The name for the owner section is [Owner]. Below is a table of available values for this section.
  50.  
  51. Setting Description owner_steamid The Steam ID of the server owner.
  52. Example Owner Configuration
  53. \\
  54. [Owner]\\
  55. force owner_steamid = STEAM_0:1:12345678;\\
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement